public void Test_GetFormField_NoPropReturnsNull() { //---------------Set up test pack------------------- UIDefStub uiDef = new UIDefStub(); uiDef.SetUIForm(GetUiForm()); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- IUIFormField formField = uiDef.GetFormField("propDoesNotExist"); //---------------Test Result ----------------------- Assert.AreEqual(null, formField); }
public void Test_GetFormField() { //---------------Set up test pack------------------- UIDefStub uiDef = new UIDefStub(); uiDef.SetUIForm(GetUiForm()); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- IUIFormField formField = uiDef.GetFormField("prop1"); //---------------Test Result ----------------------- Assert.AreEqual("prop1", formField.PropertyName); }