public void GetNextColor_ReturnsFirstColor_OnFirstCall() { FrequencyBasedColorAlternator alternator = GetDummyAlternator(); Color firstColor = alternator.GetNextColor(dummyTarget); Assert.Equal(firstColor, dummyColors.First()); }
public void GetNextColor_ReturnsThirdColor_OnThirdCall() { FrequencyBasedColorAlternator alternator = GetDummyAlternator(); Color firstColor = alternator.GetNextColor(dummyTarget); Color secondColor = alternator.GetNextColor(dummyTarget); Color thirdColor = alternator.GetNextColor(dummyTarget); Assert.Equal(thirdColor, dummyColors.Last()); }
public void GetNextColor_ThrowsException_WhenCalledWithNoColorsAssigned() { FrequencyBasedColorAlternator alternator = new FrequencyBasedColorAlternator(1); Assert.Throws <InvalidOperationException>(() => alternator.GetNextColor(dummyTarget)); }
public void GetNextColor_ThrowsException_WhenCalledWithNoColorsAssigned() { FrequencyBasedColorAlternator alternator = new FrequencyBasedColorAlternator(1); Assert.Throws<InvalidOperationException>(() => alternator.GetNextColor(dummyTarget)); }