Ejemplo n.º 1
0
    public bool PosTest3()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest3: Convert the \"-0\" to String ");

        try
        {
            Int32 i1 = -0;
            if (i1.ToString() != GlobLocHelper.OSInt32ToString(i1))
            {
                TestLibrary.TestFramework.LogError("005", "The result is not the value as expected. ");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
            retVal = false;
        }

        return(retVal);
    }
Ejemplo n.º 2
0
    public bool PosTest4()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest4: Check the int32 in the beginning of which there are some zeros ");

        try
        {
            Int32  i1 = -00000765;
            string s1 = i1.ToString((IFormatProvider)null);
            if (s1 != GlobLocHelper.OSInt32ToString(i1))
            {
                TestLibrary.TestFramework.LogError("007", "The result is not the value as expected. ");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
            retVal = false;
        }

        return(retVal);
    }
Ejemplo n.º 3
0
    public bool PosTest2()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest2: Convert the int32MinValue to String ");

        try
        {
            Int32  i1 = Int32.MinValue;
            string s1 = i1.ToString(new CultureInfo("pl-PL"));
            if (s1 != GlobLocHelper.OSInt32ToString(i1, new CultureInfo("pl-PL")))
            {
                TestLibrary.TestFramework.LogError("003", "The result is not the value as expected. ");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
            retVal = false;
        }

        return(retVal);
    }