Esempio n. 1
0
    public bool PosTest8()
    {
        bool   retVal = true;
        string ActualResult;
        object ObjA;
        object ObjB;

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

        TestLibrary.TestFramework.BeginTestCase("StringConcat2");

        if (sc2.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Esempio n. 3
0
    public static int Main()
    {
        StringConcat2 sc2 = new StringConcat2();

        TestLibrary.TestFramework.BeginTestCase("StringConcat2");

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