Exemplo n.º 1
0
    public bool PosTest(int seqNumber, long value, string description, CultureInfo provider, string providerDesc, string expectedValue)
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest " + seqNumber.ToString() + ": " + description +
                                                ".ToString('" + providerDesc + "')");
        try
        {
            string actual = value.ToString(provider);
            expectedValue = GlobLocHelper.OSInt64ToString(value, provider);
            if (!actual.Equals(expectedValue))
            {
                TestLibrary.TestFramework.LogError("00" + seqNumber.ToString() + ".1",
                                                   "Expected: " + expectedValue + ", Actual: " + actual);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("00" + seqNumber.ToString() + ".2", "Unexpected exception:" + e);
            retVal = false;
        }
        return(retVal);
    }