示例#1
0
 public void ThrowsNegativeNotAllowedExceptionWhenOneNewlineMinusTwoIsPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("1\n-2");
     Assert.AreEqual(0, result);
 }
示例#2
0
 public void ThrowForMatExceptionWhenSlashSlashDelimiterNewLine()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//;\n");
    // Assert.AreEqual(0, result);
 }
示例#3
0
 public void ThrowFormatExceptionWhenSlashSlashDelimiterNewLineADelimiterBIsPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//;\na;b");
      Assert.AreEqual(0, result);
 }
示例#4
0
 public void ReturnThreeWhenSlashSlashDelimiterNewLineNullOneDelimiterTwoISPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//\n\n1\n2");
     Assert.AreEqual(3, result);
 }
示例#5
0
 public void ExceptionOccuredwhenSlashSlashCommaIsPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//,");
     Assert.AreEqual(3, result);
 }
示例#6
0
 public void ReturnThreeWhenOneCommaTwoISPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("1,2");
     Assert.AreEqual(3, result);
 }
示例#7
0
  public void ReturnSixWhenOneNewlineTwoCommaThreeISPassed()
  {
      AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
      int result = ob.Add("1\n2,3");
      Assert.AreEqual(6, result);
 } 
示例#8
0
 public void ReturnTwoWhenTwoISPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("2");
     Assert.AreEqual(2, result);
 }
示例#9
0
 public void ReturnOneWhenOneISPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("1");
     Assert.AreEqual(1, result);
 }
示例#10
0
 public void ThrowArguementExceptionWhenSlashSlashABCIsPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//abc");
     Assert.AreEqual(0, result);
 }
示例#11
0
 public void ThrowsNegativeNotAllowedExceptionWhenSlashSlashDelimiterNewlineMinusOneNewlineTwoIsPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("//\n\n-1\n2");
     Assert.AreEqual(0, result);
 }
示例#12
0
 public void ReturnZeroWhenNullStringISPassed()
 {
     AirthmeticStringCalculator ob = new AirthmeticStringCalculator();
     int result = ob.Add("");
     Assert.AreEqual(0, result);
 }