Exemplo n.º 1
0
    public bool PosTest5()
    {
        bool   retVal = true;
        string ActualResult;

        object[] ObjA;
        TestLibrary.TestFramework.BeginScenario("PosTest5:Concat object Array with int,datetime,bool and class instance member");
        try
        {
            object obj1 = -123;
            object obj2 = new DateTime();
            object obj3 = new bool();
            object obj4 = new StringConcat4();
            ObjA         = new object[] { obj1, obj2, obj3, obj4 };
            ActualResult = string.Concat(ObjA);
            if (ActualResult != MergeStrings(ObjA))
            {
                TestLibrary.TestFramework.LogError("009", "Concat an object of int ExpectResult is equel" + MergeStrings(ObjA) + " ,ActualResult is (" + ActualResult + ")");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
            retVal = false;
        }
        return(retVal);
    }
Exemplo n.º 2
0
    public static int Main()
    {
        StringConcat4 sc4 = new StringConcat4();

        TestLibrary.TestFramework.BeginTestCase("StringConcat4");

        if (sc4.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Exemplo n.º 3
0
    public static int Main()
    {
        StringConcat4 sc4 = new StringConcat4();

        TestLibrary.TestFramework.BeginTestCase("StringConcat4");

        if (sc4.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Exemplo n.º 4
0
 public bool PosTest5()
 {
     bool retVal = true;
     string ActualResult;
     object[] ObjA;
     TestLibrary.TestFramework.BeginScenario("PosTest5:Concat object Array with int,datetime,bool and class instance member");
     try
     {
         object obj1 = -123;
         object obj2 = new DateTime();
         object obj3 = new bool();
         object obj4 = new StringConcat4();
         ObjA = new object[] { obj1, obj2, obj3, obj4 };
         ActualResult = string.Concat(ObjA);
         if (ActualResult != MergeStrings(ObjA))
         {
             TestLibrary.TestFramework.LogError("009", "Concat an object of int ExpectResult is equel" + MergeStrings(ObjA) + " ,ActualResult is (" + ActualResult + ")");
             retVal = false;
         }
     }
     catch (Exception e)
     {
         TestLibrary.TestFramework.LogError("010", "Unexpected exception" + e);
         retVal = false;
     }
     return retVal;
 }