refactor(net): converge live session state reset
This commit is contained in:
parent
78a9223b65
commit
4f31a5085f
35 changed files with 1460 additions and 83 deletions
|
|
@ -55,4 +55,25 @@ public sealed class GameplayConfirmationControllerTests
|
|||
Assert.Equal([(7u, 99u, false)], responses);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FactoryReset_CompletesResponseBeforeSessionTupleIsForgotten()
|
||||
{
|
||||
var root = new UiRoot { Width = 800f, Height = 600f };
|
||||
var factory = new RetailDialogFactory(root, _ =>
|
||||
FixtureLoader.LoadConfirmationDialog());
|
||||
var responses = new List<(uint Type, uint Context, bool Accepted)>();
|
||||
using var controller = new GameplayConfirmationController(
|
||||
factory,
|
||||
(type, context, accepted) => responses.Add((type, context, accepted)));
|
||||
controller.HandleRequest(
|
||||
new GameEvents.CharacterConfirmationRequest(7u, 99u, "Proceed?"));
|
||||
|
||||
factory.Reset();
|
||||
controller.ResetSession();
|
||||
|
||||
Assert.Equal(0u, controller.ActiveDialogContext);
|
||||
Assert.Equal([(7u, 99u, false)], responses);
|
||||
Assert.False(factory.IsOpen);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue