public void Test_AddClickEventHandler_WhenMapperUsingControlAdapter_ShouldAddBehaviours() { //---------------Set up test pack------------------- var checkBoxWin = GetWinFormsControlAdapter(); DisposeOnTearDown(checkBoxWin); var checkBoxMapper = new CheckBoxMapperStub(checkBoxWin); //---------------Assert Precondition---------------- Assert.IsInstanceOf<CheckBox>(checkBoxMapper.GetControl()); //---------------Execute Test ---------------------- var checkBoxStrategyWin = new CheckBoxStrategyWin(); checkBoxStrategyWin.AddClickEventHandler(checkBoxMapper); //---------------Assert Result---------------------- Assert.IsTrue(true, "If an error was not thrown then we are OK"); }
public void Test_AddClickEventHandler_WhenMapperUsingHabaneroControl_ShouldAddBehaviours() { //---------------Set up test pack------------------- var checkBoxWin = new CheckBoxWin {Name = "TestCheckBox", Checked = false, Enabled = true}; DisposeOnTearDown(checkBoxWin); var checkBoxMapper = new CheckBoxMapperStub(checkBoxWin); //---------------Assert Precondition---------------- Assert.IsInstanceOf<ICheckBox>(checkBoxMapper.Control); //---------------Execute Test ---------------------- var checkBoxStrategyWin = new CheckBoxStrategyWin(); checkBoxStrategyWin.AddClickEventHandler(checkBoxMapper); //---------------Assert Result---------------------- Assert.IsTrue(true, "If an error was not thrown then we are OK"); }
public void Test_AddClickEventHandler_WhenMapperUsingControlAdapter_ShouldAddBehaviours() { //---------------Set up test pack------------------- var checkBoxWin = GetWinFormsControlAdapter(); DisposeOnTearDown(checkBoxWin); var checkBoxMapper = new CheckBoxMapperStub(checkBoxWin); //---------------Assert Precondition---------------- Assert.IsInstanceOf <CheckBox>(checkBoxMapper.GetControl()); //---------------Execute Test ---------------------- var checkBoxStrategyWin = new CheckBoxStrategyWin(); checkBoxStrategyWin.AddClickEventHandler(checkBoxMapper); //---------------Assert Result---------------------- Assert.IsTrue(true, "If an error was not thrown then we are OK"); }
public void Test_AddClickEventHandler_WhenMapperUsingHabaneroControl_ShouldAddBehaviours() { //---------------Set up test pack------------------- var checkBoxWin = new CheckBoxWin { Name = "TestCheckBox", Checked = false, Enabled = true }; DisposeOnTearDown(checkBoxWin); var checkBoxMapper = new CheckBoxMapperStub(checkBoxWin); //---------------Assert Precondition---------------- Assert.IsInstanceOf <ICheckBox>(checkBoxMapper.Control); //---------------Execute Test ---------------------- var checkBoxStrategyWin = new CheckBoxStrategyWin(); checkBoxStrategyWin.AddClickEventHandler(checkBoxMapper); //---------------Assert Result---------------------- Assert.IsTrue(true, "If an error was not thrown then we are OK"); }