fix: improve minigame reconnect flow
This commit is contained in:
@@ -74,6 +74,23 @@ namespace XWorld.Server.Host.Tests
|
||||
() => host.CreateRoom("dup", "rps", 1, Cfg(), Players, new Capture()));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EndRoom_ReleasesRoomImmediately()
|
||||
{
|
||||
var host = NewHost();
|
||||
var cap = new Capture();
|
||||
host.CreateRoom("manual", "rps", 1, Cfg(), Players, cap);
|
||||
|
||||
Assert.True(host.EndRoom("manual"));
|
||||
Assert.Equal(0, host.ActiveRoomCount);
|
||||
|
||||
int broadcasts = cap.Broadcasts.Count;
|
||||
host.DeliverTo("manual", 1, new NetMessage(1, new byte[] { (byte)Choice.Rock }));
|
||||
host.TickAll(0.1f);
|
||||
|
||||
Assert.Equal(broadcasts, cap.Broadcasts.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TickAll_ReturnsEndedRoomIds()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user