コード例 #1
0
 public void When_Starts_At_Odd_Then_The_Start_Value_Is_Included()
 {
     var instance = new OddNumberSequence();
     var result = instance.Generate(1, 10);
     Assert.IsNotNull(result);
     Assert.AreEqual("1", result.First());
 }
コード例 #2
0
 public void When_Ends_At_Odd_Then_The_End_Value_Is_Included()
 {
     var instance = new OddNumberSequence();
     var result = instance.Generate(0, 11);
     Assert.IsNotNull(result);
     Assert.AreEqual("11", result.Last());
 }
コード例 #3
0
 public void When_Start_Is_Greater_Than_End()
 {
     var instance = new OddNumberSequence();
     var result = instance.Generate(11, 10);
     result.ToArray();
     Assert.Fail("Should Fail");
 }
コード例 #4
0
 public void When_Generate_Normal_Sequence()
 {
     var instance = new OddNumberSequence();
     var result = instance.Generate(0, 10);
     Assert.IsNotNull(result);
     Assert.AreEqual(5, result.Count());
     Assert.AreEqual("1,3,5,7,9", String.Join(",", result.ToArray()));
 }