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

        const string c_TEST_ID   = "P002";
        const string c_TEST_DESC = "PosTest2: lowercase character";
        string       errorDesc;

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            char ch           = 'a';
            char expectedChar = GlobLocHelper.OSToLower(ch); // ch;
            char actualChar   = char.ToLower(ch);
            if (actualChar != expectedChar)
            {
                errorDesc  = string.Format("Lowercase of character \\u{0:x} is not the value ", (int)ch);
                errorDesc += string.Format("\\u{0:x} as expected: actual(\\u{1:x}", (int)expectedChar, (int)actualChar);
                TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            errorDesc = "Unexpected exception: " + e;
            TestLibrary.TestFramework.LogError("004" + " TestId-" + c_TEST_ID, errorDesc);
            retVal = false;
        }

        return(retVal);
    }