public void TenderStrategyDisplayReturnsProperlyFormattedStringValueForZeroCount() { currencyMock.Setup(p => p.AllDenominations).Returns(new List <Money>() { new Bill(1, "dollar", "dollars", 0) }); string expected = "No Change Due\n"; TenderStrategy tenderStrategy = new TenderStrategyTestMock(); var actual = tenderStrategy.Display(currencyMock.Object); Assert.Equal(expected, actual); }
public void TenderStrategyDisplayReturnsProperStringValueForMultipleDenominations() { currencyMock.Setup(p => p.AllDenominations).Returns(new List <Money>() { new Bill(5, "five dollar", "five dollars", 10), new Bill(1, "dollar", "dollars", 1), new Coin(.01m, "dime", "dimes", 3), new Coin(.01m, "penny", "pennies", 1) }); string expected = "10 five dollars,1 dollar,3 dimes,1 penny\n"; TenderStrategy tenderStrategy = new TenderStrategyTestMock(); var actual = tenderStrategy.Display(currencyMock.Object); Assert.Equal(expected, actual); }