Example #1
0
    public bool PosTest2()
    {
        bool         retVal      = true;
        const string c_TEST_DESC = "PosTest2: the parameter is empty ... ";
        const string c_TEST_ID   = "P002";

        string c_PROPERTYNAME = "";

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
            if (atpa == null)
            {
                string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
                errorDesc += "\n parameter is empty";
                TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return(retVal);
    }
Example #2
0
    public bool PosTest2()
    {
        bool   retVal         = true;
        string c_TEST_DESC    = "PosTest2: Verfify the PropertyName is empty ... ";
        string c_TEST_ID      = "P002";
        string c_PROPERTYNAME = "";

        System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            if (atpa.PropertyName != c_PROPERTYNAME)
            {
                string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is empty";
                TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs :" + e);
            retVal = false;
        }

        return(retVal);
    }
Example #3
0
    public bool PosTest1()
    {
        bool         retVal      = true;
        const string c_TEST_DESC = "PosTest1: Create a new AccessedThroughPropertyAttribute instance ... ";
        const string c_TEST_ID   = "P001";

        string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
            if (atpa == null)
            {
                string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
                errorDesc += "\n parameter is " + c_PROPERTYNAME;
                TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return(retVal);
    }
Example #4
0
    public bool PosTest1()
    {
        bool   retVal         = true;
        string c_TEST_DESC    = "PosTest1: Verfify property PropertyName ... ";
        string c_TEST_ID      = "P001";
        string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);

        System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            if (atpa.PropertyName != c_PROPERTYNAME)
            {
                string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is " + atpa.PropertyName;
                TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return(retVal);
    }
Example #5
0
    public bool PosTest2()
    {
        bool retVal = true;
        string c_TEST_DESC = "PosTest2: Verfify the PropertyName is empty ... ";
        string c_TEST_ID = "P002";
        string c_PROPERTYNAME = "";

        System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            if (atpa.PropertyName != c_PROPERTYNAME)
            {
                string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is empty"; 
                TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }


        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "Unexpected exception occurs :" + e);
            retVal = false;
        }

        return retVal;
    }
Example #6
0
    public bool PosTest1()
    {
        bool retVal = true;
        string c_TEST_DESC = "PosTest1: Verfify property PropertyName ... ";
        string c_TEST_ID = "P001";
        string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false, c_MIN_STRING_LEN, c_MAX_STRING_LEN);

        System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            if (atpa.PropertyName != c_PROPERTYNAME)
            {
                string errorDesc = "value is not " + c_PROPERTYNAME + " as expected: Actual is " + atpa.PropertyName;
                TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }
            

        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return retVal;
    }
Example #7
0
    public bool PosTest1()
    {
        bool retVal = true;
        const string c_TEST_DESC = "PosTest1: Create a new AccessedThroughPropertyAttribute instance ... ";
        const string c_TEST_ID = "P001";

        string c_PROPERTYNAME = TestLibrary.Generator.GetString(-55, false,c_MIN_STRING_LEN,c_MAX_STRING_LEN);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
            if (atpa == null)
            {
                string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
                errorDesc += "\n parameter is " + c_PROPERTYNAME;
                TestLibrary.TestFramework.LogError("001" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }


        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return retVal;
    }
Example #8
0
    public bool PosTest2()
    {
        bool retVal = true;
        const string c_TEST_DESC = "PosTest2: the parameter is empty ... ";
        const string c_TEST_ID = "P002";

        string c_PROPERTYNAME = "";

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);
        try
        {
            System.Runtime.CompilerServices.AccessedThroughPropertyAttribute atpa = new System.Runtime.CompilerServices.AccessedThroughPropertyAttribute(c_PROPERTYNAME);
            if (atpa == null)
            {
                string errorDesc = "the AccessedThroughPropertyAttribute ctor error occurred.)";
                errorDesc += "\n parameter is empty";
                TestLibrary.TestFramework.LogError("003" + " TestId-" + c_TEST_ID, errorDesc);
                retVal = false;
            }


        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "unexpected exception occurs :" + e);
            retVal = false;
        }

        return retVal;
    }