Example #1
0
 public void IfConfigHasTwoNumbers_ThatCanDivideSameInput_ReturnCorrectString()
 {
     var sut = new FizzBuzzService(1, 100);
     var dict = new Dictionary<ulong, string> { { 5, "Foo" }, { 3, "Fizz" }, { 4, "Buzz" } };
     string actualValue = sut.ProcessFizzBuzz(20, dict);
     Assert.That(actualValue, Is.EqualTo("FooBuzz"));
 }
Example #2
0
 public void IfConfigHasCompositeNumber_ThatCanDivideInput_AndPairOfFactorsExist_ReturnCorrectString()
 {
     var sut = new FizzBuzzService(1, 100);
     var dict = new Dictionary<ulong, string> { { 12, "Foo" }, { 3, "Fizz" }, { 4, "Buzz" } };
     string actualValue = sut.ProcessFizzBuzz(24, dict);
     Assert.That(actualValue, Is.EqualTo("FizzBuzz"));
 }
Example #3
0
 public void IfConfigHasPrimeNumber_ThatCanDivideInput_ReturnCorrectString()
 {
     var sut = new FizzBuzzService(1, 100);
     var dict = new Dictionary<ulong, string> { { 3, "Foo" } };
     string actualValue = sut.ProcessFizzBuzz(39, dict);
     Assert.That(actualValue, Is.EqualTo(dict[3]));
 }
Example #4
0
 public void CanProgramAcceptLongNumbers()
 {
     var sut = new FizzBuzzService(1, 100);
     var dict = new Dictionary<ulong, string> { { 5, "Foo" }, { 3, "Fizz" } };
     string actualValue = sut.ProcessFizzBuzz(ulong.MaxValue, dict);
     Assert.That(actualValue, Is.EqualTo("FooFizz"));
 }