CallCancelClick() public method

public CallCancelClick ( ) : void
return void
示例#1
0
        public void Test_CancelButton_WhenClicked_ShouldCancelEditsAndCloseForm()
        {
            //---------------Set up test pack-------------------
            GetClassDefs();
            IControlFactory          controlFactory     = GetControlFactory();
            ExtendedTextBoxVWG       extendedTextBoxVWG = new ExtendedTextBoxVWG(controlFactory);
            const string             propName           = "OrganisationID";
            ExtendedTextBoxMapperSpy mapper             = new ExtendedTextBoxMapperSpy(
                extendedTextBoxVWG, propName, true, controlFactory);

            mapper.BusinessObject = new ContactPersonTestBO();
            mapper.CallSetupPopupForm();
            //---------------Assert Precondition----------------
            Assert.IsFalse(mapper.FormClosed);
            //---------------Execute Test ----------------------
            mapper.CallCancelClick();
            //---------------Test Result -----------------------
            Assert.IsTrue(mapper.FormClosed);
        }
 public void Test_CancelButton_WhenClicked_ShouldCancelEditsAndCloseForm()
 {
     //---------------Set up test pack-------------------
     GetClassDefs();
     IControlFactory controlFactory = GetControlFactory();
     ExtendedTextBoxVWG extendedTextBoxVWG = new ExtendedTextBoxVWG(controlFactory);
     const string propName = "OrganisationID";
     ExtendedTextBoxMapperSpy mapper = new ExtendedTextBoxMapperSpy(
         extendedTextBoxVWG, propName, true, controlFactory);
     mapper.BusinessObject = new ContactPersonTestBO();
     mapper.CallSetupPopupForm();
     //---------------Assert Precondition----------------
     Assert.IsFalse(mapper.FormClosed);
     //---------------Execute Test ----------------------
     mapper.CallCancelClick();
     //---------------Test Result -----------------------
     Assert.IsTrue(mapper.FormClosed);
 }