public void ShouldReturnNumberIfNumberIsAMultipleOfFive() { //When var result = MultiplesOfThreeAndFive.GetMultipleOfThreeAndFive(10); //Then Assert.Contains(5, result); }
public void ShouldCalulcateTheSumOfMultplesOfThreeAndFive() { //When var result = MultiplesOfThreeAndFive.SumOfMultipleOfThreeAndFive(1000); //Then const int expectedSum = 233168; Assert.Equal(expectedSum, result); }
public void ShouldNotContainDuplicateMultipleFactors() { //When var result = MultiplesOfThreeAndFive.GetMultipleOfThreeAndFive(15); //Then var distinctAmount = result.Distinct().Count(); Assert.Equal(distinctAmount, result.Count); }
public void ShouldReturnAllMultipleOfThreeAndFiveBelow1000() { //When var result = MultiplesOfThreeAndFive.GetMultipleOfThreeAndFive(1000); //Then Assert.Contains(3, result); Assert.Contains(5, result); Assert.Contains(6, result); Assert.Contains(9, result); }
public void MultiplesOfThreeAndFive_ForGivenNumbers_ReturnsExpectedSum() { // Arrange const int ExpectedSum = 23; // Act var result = MultiplesOfThreeAndFive.CalculateSumOfThreeAndFiveMultiples(1, 10); // Assert result.ShouldBe(ExpectedSum); }
public void FindSumOfAllMultiplesOfThreeOrFive_ShouldWork(int expected, int total) { int actual = MultiplesOfThreeAndFive.SumOfAllMultiplesOfThreeOrFive(total); Assert.Equal <int>(expected, actual); }