public void BuzzFizzGetStringOutputForNeither3No5MultiplersTest() { var testNumbers = new List <int> { 4, 7, 11 }; foreach (var testNumber in testNumbers) { BuzzFizz.GetStringOutput(testNumber).ShouldBe(testNumber.ToString()); } }
static void Main(string[] args) { /* * Write a program that prints to the console the numbers from 1 to 100 * But for multiples of three print "Buzz" instead of the number * and for the multiples of five print "Fizz". * For numbers which are multiples of both three and five print "BuzzFizz" */ for (var i = 1; i <= 100; i++) { Console.WriteLine(BuzzFizz.GetStringOutput(i)); } Console.WriteLine("Press enter to quit..."); Console.ReadLine(); }
public void BuzzFizzGetStringOutputFor3And5MultiplersTest() { BuzzFizz.GetStringOutput(15).ShouldBe(BuzzFizzOutput); BuzzFizz.GetStringOutput(30).ShouldBe(BuzzFizzOutput); BuzzFizz.GetStringOutput(60).ShouldBe(BuzzFizzOutput); }
public void BuzzFizzGetStringOutputFor5MultiplerTest() { BuzzFizz.GetStringOutput(5).ShouldBe(FizzOutput); BuzzFizz.GetStringOutput(20).ShouldBe(FizzOutput); BuzzFizz.GetStringOutput(100).ShouldBe(FizzOutput); }
public void BuzzFizzGetStringOutputFor3MultiplerTest() { BuzzFizz.GetStringOutput(3).ShouldBe(BuzzOutput); BuzzFizz.GetStringOutput(6).ShouldBe(BuzzOutput); BuzzFizz.GetStringOutput(9).ShouldBe(BuzzOutput); }