コード例 #1
0
 public void TestCustomWords()
 {
     IDictionary<Int64,String> canadaCities = new SortedDictionary<Int64, String>();
     canadaCities.Add(4, "Victoria");
     canadaCities.Add(9, "Yellowknife");
     canadaCities.Add(13, "Goose Bay");
     canadaCities.Add(17, "Val D'Or");
     FizzBuzz fizzbuzz = new FizzBuzz(300, canadaCities);
     String result = fizzbuzz.CalcOutput(36);
     Assert.AreEqual("Yellowknife", result);
     result = fizzbuzz.CalcOutput(34);
     Assert.AreEqual("Val D'Or", result);
 }
コード例 #2
0
        public void TestCustomWords()
        {
            IDictionary <Int64, String> canadaCities = new SortedDictionary <Int64, String>();

            canadaCities.Add(4, "Victoria");
            canadaCities.Add(9, "Yellowknife");
            canadaCities.Add(13, "Goose Bay");
            canadaCities.Add(17, "Val D'Or");
            FizzBuzz fizzbuzz = new FizzBuzz(300, canadaCities);
            String   result   = fizzbuzz.CalcOutput(36);

            Assert.AreEqual("Yellowknife", result);
            result = fizzbuzz.CalcOutput(34);
            Assert.AreEqual("Val D'Or", result);
        }
コード例 #3
0
 public void TestNumber15()
 {
     String expected = "buzz";
     FizzBuzz fizzbuzz = new FizzBuzz(100);
     String result = fizzbuzz.CalcOutput(15);
     Assert.AreEqual(expected, result);
 }
コード例 #4
0
        public void TestNumber15()
        {
            String   expected = "buzz";
            FizzBuzz fizzbuzz = new FizzBuzz(100);
            String   result   = fizzbuzz.CalcOutput(15);

            Assert.AreEqual(expected, result);
        }