コード例 #1
0
        public void WhenReadingIncorrectInputStringsThenCalculatorExceptionIsThrown()
        {
            string input = CalculatorForm.GetCalculatorString("t", "1nn2nn3nn4");

            Calculator.Add(input);
        }
コード例 #2
0
 public void WhenReadingNoDelimiterThenOutputIsCorrect()
 {
     Assert.AreEqual("1,2,3" + Environment.NewLine + "4", CalculatorForm.GetCalculatorString("", "1,2,3" + Environment.NewLine + "4"));
 }
コード例 #3
0
 public void WhenReadingMultipleMulticharacterDelimitersThenOutputIsCorrect()
 {
     Assert.AreEqual("//[nn][zv]" + Environment.NewLine + "1zv2nn3zv4", CalculatorForm.GetCalculatorString("[nn][zv]", "1zv2nn3zv4"));
 }
コード例 #4
0
 public void WhenReadingSingleCharacterDelimiterThenOutputIsCorrect()
 {
     Assert.AreEqual("//|" + Environment.NewLine + "1|2|3|4", CalculatorForm.GetCalculatorString("|", "1|2|3|4"));
 }