public void TestIsStateSameForDifferentConnectedPlayers() { // Make an original heartbeat SessionHostHeartbeatInfo original = CreateSessionHostHeartbeatInfo(); SessionHostHeartbeatInfo copy = CreateSessionHostHeartbeatInfo(); CopyState(original, copy); Assert.IsTrue(original.IsStateSame(copy)); copy.CurrentPlayers = original.CurrentPlayers.Concat(GetConnectedPlayers()).ToList(); Assert.IsFalse(original.IsStateSame(copy)); }
public void TestIsStateSameForDifferentServerHealth() { SessionHostHeartbeatInfo original = CreateSessionHostHeartbeatInfo(); original.CurrentGameHealth = SessionHostHealth.Unhealthy; SessionHostHeartbeatInfo copy = CreateSessionHostHeartbeatInfo(); CopyState(original, copy); Assert.IsTrue(original.IsStateSame(copy)); copy.CurrentGameHealth = SessionHostHealth.Healthy; Assert.IsFalse(original.IsStateSame(copy)); }
public void TestIsStateSameForDifferentServerState() { SessionHostHeartbeatInfo original = CreateSessionHostHeartbeatInfo(); original.CurrentGameState = SessionHostStatus.Active; SessionHostHeartbeatInfo copy = CreateSessionHostHeartbeatInfo(); CopyState(original, copy); Assert.IsTrue(original.IsStateSame(copy)); copy.CurrentGameState = SessionHostStatus.Terminating; Assert.IsFalse(original.IsStateSame(copy)); }