Fix failing tests

This commit is contained in:
smoogipoo 2021-04-23 00:49:14 +09:00
parent 90ecda91af
commit b25340653d
1 changed files with 7 additions and 6 deletions

View File

@ -120,9 +120,12 @@ private void load(GameHost host, AudioManager audio)
};
});
[Test]
public void TestEnabledWhenRoomOpen()
[TestCase(MultiplayerRoomState.Open)]
[TestCase(MultiplayerRoomState.WaitingForLoad)]
[TestCase(MultiplayerRoomState.Playing)]
public void TestEnabledWhenRoomOpenOrInGameplay(MultiplayerRoomState roomState)
{
AddStep($"change room to {roomState}", () => Client.ChangeRoomState(roomState));
assertSpectateButtonEnablement(true);
}
@ -137,12 +140,10 @@ public void TestToggleWhenIdle(MultiplayerUserState initialState)
AddAssert("user is idle", () => Client.Room?.Users[0].State == MultiplayerUserState.Idle);
}
[TestCase(MultiplayerRoomState.WaitingForLoad)]
[TestCase(MultiplayerRoomState.Playing)]
[TestCase(MultiplayerRoomState.Closed)]
public void TestDisabledDuringGameplayOrClosed(MultiplayerRoomState roomState)
public void TestDisabledWhenClosed(MultiplayerRoomState roomState)
{
AddStep($"change user to {roomState}", () => Client.ChangeRoomState(roomState));
AddStep($"change room to {roomState}", () => Client.ChangeRoomState(roomState));
assertSpectateButtonEnablement(false);
}