public void Test_GetIBOGridAndEditorControl_ShouldReturnEditorOnForm() { //---------------Set up test pack------------------- OrganisationTestBO.LoadDefaultClassDef(); IControlFactory controlFactory = GetControlFactory(); ExtendedComboBoxWin extendedComboBox = new ExtendedComboBoxWin(controlFactory); const string propName = "OrganisationID"; var mapper = new ExtendedComboBoxMapperSpy( extendedComboBox, propName, true, controlFactory); mapper.BusinessObject = new ContactPersonTestBO(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- mapper.ShowPopupForm(); var boGridAndEditorControl = mapper.CallGetIBOGridAndEditorControl(); //---------------Test Result ----------------------- IFormHabanero form = mapper.PopupForm; Assert.AreSame(boGridAndEditorControl, form.Controls[0]); }