Пример #1
0
    public bool PosTest10()
    {
        bool   retVal = true;
        string ActualResult;
        object ObjA;
        object ObjB;
        object ObjC;

        TestLibrary.TestFramework.BeginScenario("PosTest10:Concat two guids with a \n string in middle");
        try
        {
            ObjA         = new Guid();
            ObjB         = "\n";
            ObjC         = new Guid();
            ActualResult = string.Concat(ObjA, ObjB, ObjC);
            if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
            {
                TestLibrary.TestFramework.LogError("019", "Concat two guids with a \n string in middle ExpectResult is equel" + ObjA.ToString() + ObjB.ToString() + ObjC.ToString() + ",ActualResult is (" + ActualResult + ")");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("020", "Unexpected exception" + e);
            retVal = false;
        }
        return(retVal);
    }
Пример #2
0
    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);
    }
Пример #3
0
    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);
    }
Пример #4
0
    public bool PosTest4()
    {
        bool   retVal = true;
        string ActualResult;
        object ObjA;
        object ObjB;
        object ObjC;

        TestLibrary.TestFramework.BeginScenario("PosTest4: Concat three special strings");
        try
        {
            ObjA         = new string('\t', 2);
            ObjB         = "\n";
            ObjC         = "\t";
            ActualResult = string.Concat(ObjA, ObjB, ObjC);
            if (ActualResult != ObjA.ToString() + ObjB.ToString() + ObjC.ToString())
            {
                TestLibrary.TestFramework.LogError("007", "Concat three special strings ExpectResult is" + ObjB.ToString() + ObjA.ToString() + ObjC.ToString() + " ,ActualResult is (" + ActualResult + ")");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("008", "Unexpected exception" + e);
            retVal = false;
        }
        return(retVal);
    }