Exemplo n.º 1
0
        public void TestHasParameterValue_False()
        {
            //---------------Set up test pack-------------------
            UIFormField uiFormField1 = new UIFormField("L", "L", "", "", "", "", true, null, "", new Hashtable(), LayoutStyle.Label);
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            bool hasParameterValue = uiFormField1.HasParameterValue(TestUtil.GetRandomString());

            //---------------Test Result -----------------------
            Assert.IsFalse(hasParameterValue);
        }
Exemplo n.º 2
0
        public void TestHasParameterValue_True()
        {
            //---------------Set up test pack-------------------
            Hashtable    parameters    = new Hashtable();
            const string parameterName = "bob";

            parameters.Add(parameterName, "I can like to have a value");
            UIFormField uiFormField1 = new UIFormField("L", "L", "", "", "", "", true, null, "", parameters, LayoutStyle.Label);

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            bool hasParameterValue = uiFormField1.HasParameterValue(parameterName);

            //---------------Test Result -----------------------
            Assert.IsTrue(hasParameterValue);
        }