public bool PosTest5() { bool retVal = true; string ActualResult; object ObjA; object ObjB; object ObjC; TestLibrary.TestFramework.BeginScenario("PosTest5:Concat three numbers of less than 0"); try { ObjA = -123; ObjB = -123; ObjC = -123; ActualResult = string.Concat(ObjA, ObjB, ObjC); if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString()) { TestLibrary.TestFramework.LogError("009", "Concat three numbers of less than 0 ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")"); retVal = false; } } catch (Exception e) { TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e); retVal = false; } return(retVal); }
public bool PosTest9() { bool retVal = true; string ActualResult; object ObjA; object ObjB; object ObjC; TestLibrary.TestFramework.BeginScenario("PosTest9: Concat int and special symbol and an object of Guid"); try { ObjA = 123; ObjB = "\n"; ObjC = new Guid(); ActualResult = string.Concat(ObjA, ObjB, ObjC); if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString()) { TestLibrary.TestFramework.LogError("017", "Concat int and special symbol and an object of Guid ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")"); retVal = false; } } catch (Exception e) { TestLibrary.TestFramework.LogError("018", "Unexpected exception" + e); retVal = false; } return(retVal); }
public bool PosTest13() { bool retVal = true; string ActualResult; object ObjA; TestLibrary.TestFramework.BeginScenario("PosTest13:Concat an object of number of less than 0"); try { ObjA = -123; ActualResult = string.Concat(ObjA); if (ActualResult != ObjA.ToString()) { TestLibrary.TestFramework.LogError("025", "Concat an object of number of less than 0 ExpectResult is equel" + ObjA.ToString() + ",ActualResult is (" + ActualResult + ")"); retVal = false; } } catch (Exception e) { TestLibrary.TestFramework.LogError("026", "Unexpected exception" + e); retVal = false; } return(retVal); }