public void AddingDecimals_Equals1(string psDecDigit1, string psDecDigit2) { bool boolCarry = false; string strErrMessage = ""; //var result = AddingDecs.AddDecDigits_ByArrays(" ", " ", boolCarry, strErrMessage); //------string strResult = AddingDecs.AddDecDigits_ByArrays(psDecDigit1, psDecDigit2, string strResult = AddingDecimalStrings.AddDecDigits_ByArrays(psDecDigit1, psDecDigit2, ref boolCarry, ref strErrMessage); bool bMatchesExpectation = (strResult == "1"); Assert.IsTrue(bMatchesExpectation, $"Added {psDecDigit1} and {psDecDigit2} should be equal to \"1\" not \"{strResult}\". " + strErrMessage); }
public void AddingNegatives_Equals0(string psDecDigit1, string psDecDigit2) { // //What happens when one of the numbers is negative? // bool boolCarry = false; string strErrMessage = ""; //string strResult = AddingDecs.AddDecDigits_ByArrays(psDecDigit1, psDecDigit2, string strResult = AddingDecimalStrings.AddDecDigits_ByArrays(psDecDigit1, psDecDigit2, ref boolCarry, ref strErrMessage); bool bMatchesExpectation = (strResult == "0"); Assert.IsTrue(bMatchesExpectation, $"Added {psDecDigit1} and {psDecDigit2} should be equal to \"0 \" not \"{strResult}\". " + strErrMessage); }