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