refactor(streaming): extract the update frame
This commit is contained in:
parent
4e4aac2c5a
commit
0bc9fda9de
13 changed files with 912 additions and 184 deletions
|
|
@ -349,6 +349,30 @@ public sealed class UpdateFrameOrchestratorTests
|
|||
StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GameWindow_DelegatesTheCompleteStreamingFrameBody()
|
||||
{
|
||||
string source = File.ReadAllText(Path.Combine(
|
||||
FindRepoRoot(),
|
||||
"src",
|
||||
"AcDream.App",
|
||||
"Rendering",
|
||||
"GameWindow.cs"));
|
||||
|
||||
Assert.Contains("new AcDream.App.Streaming.StreamingFrameController(", source);
|
||||
Assert.Equal(1, CountOccurrences(source, "_streamingFrame.Tick();"));
|
||||
AssertAppearsInOrder(
|
||||
source,
|
||||
"_streamingFrame.Tick();",
|
||||
"_inputDispatcher?.Tick();",
|
||||
"_liveFrameCoordinator.Tick(frameDelta);");
|
||||
Assert.DoesNotContain("_streamingController.Tick(observerCx", source,
|
||||
StringComparison.Ordinal);
|
||||
Assert.DoesNotContain("DungeonStreamingGate.Compute", source,
|
||||
StringComparison.Ordinal);
|
||||
Assert.DoesNotContain("DrainRescued()", source, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private static UpdateFrameOrchestrator Create(
|
||||
List<string> calls,
|
||||
RecordingTeardown? teardown = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue