public void RandomChange_ValueIsNotSmallest_ReturnRandomCount() { // Arrange var testCurrency = _fixture.Create <TestCurrency>(); var largest = testCurrency.Denominations.Max(x => x.Value); var maxCount = _fixture.Create <int>(); var result = 0; var changeOutput = new ChangeOutput(testCurrency); // Act result += changeOutput.RandomCount(maxCount, largest); result += changeOutput.RandomCount(maxCount, largest); result += changeOutput.RandomCount(maxCount, largest); // Assert Assert.AreNotEqual(maxCount * 3, result); }
public void RandomChange_ValueIsSmallest_ReturnMaxCount() { // Arrange var testCurrency = _fixture.Create <TestCurrency>(); var smallest = testCurrency.Denominations.Min(x => x.Value); var expected = _fixture.Create <int>(); var changeOutput = new ChangeOutput(testCurrency); // Act var result = changeOutput.RandomCount(expected, smallest); // Assert Assert.AreEqual(expected, result); }