Beispiel #1
0
    public bool PosTest8()
    {
        bool   retVal = true;
        string ActualResult;
        object ObjA;
        object ObjB;
        object ObjC;

        TestLibrary.TestFramework.BeginScenario("PosTest8:Concat null and an object of random class instance and bool object");
        try
        {
            ObjA         = null;
            ObjB         = new StringConcat3();
            ObjC         = new bool();
            ActualResult = string.Concat(ObjA, ObjB, ObjC);
            if (ActualResult != ObjB.ToString() + ObjC.ToString())
            {
                TestLibrary.TestFramework.LogError("015", "Concat null and an object of random class instance and bool object ExpectResult is equel" + ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
            retVal = false;
        }
        return(retVal);
    }
Beispiel #2
0
    public static int Main()
    {
        StringConcat3 sc3 = new StringConcat3();

        TestLibrary.TestFramework.BeginTestCase("StringConcat3");

        if (sc3.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Beispiel #3
0
    public static int Main()
    {
        StringConcat3 sc3 = new StringConcat3();

        TestLibrary.TestFramework.BeginTestCase("StringConcat3");

        if (sc3.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Beispiel #4
0
 public bool PosTest8()
 {
     bool retVal = true;
     string ActualResult;
     object ObjA;
     object ObjB;
     object ObjC;
     TestLibrary.TestFramework.BeginScenario("PosTest8:Concat null and an object of random class instance and bool object");
     try
     {
         ObjA = null;
         ObjB = new StringConcat3();
         ObjC = new bool();
         ActualResult = string.Concat(ObjA, ObjB,ObjC);
         if (ActualResult != ObjB.ToString() + ObjC.ToString())
         {
             TestLibrary.TestFramework.LogError("015", "Concat null and an object of random class instance and bool object ExpectResult is equel" + ObjB.ToString() + " ,ActualResult is (" + ActualResult + ")");
             retVal = false;
         }
     }
     catch (Exception e)
     {
         TestLibrary.TestFramework.LogError("016", "Unexpected exception" + e);
         retVal = false;
     }
     return retVal;
 }