public void TestSwapBackDoesNothingIfPreviousIsNull() { FakeChatDeltinChannelSwapperCounter counter = new FakeChatDeltinChannelSwapperCounter();; ChatChannelSwapper sut = new ChatChannelSwapper(counter); Assert.AreEqual(counter.Counter, 0); sut.SwapChannel(Channel.Group); Assert.AreEqual(counter.Counter, 1); sut.SwapBack(); Assert.AreEqual(counter.Counter, 1); }
public void TestSwapBackReturnsToPreviousChannel() { FakeChatDeltinChannelSwapperCounter counter = new FakeChatDeltinChannelSwapperCounter();; ChatChannelSwapper sut = new ChatChannelSwapper(counter); Assert.AreEqual(counter.Counter, 0); sut.SwapChannel(Channel.Group); Assert.AreEqual(counter.Counter, 1); sut.SwapChannel(Channel.Match); Assert.AreEqual(counter.Counter, 2); sut.SwapBack(); Assert.AreEqual(counter.Counter, 3); sut.SwapChannelIfDifferent(Channel.Group); Assert.AreEqual(counter.Counter, 3); }