Inheritance: Habanero.Faces.Base.NumericUpDownMapper
 public void Test_AddValueChangedHandler_WhenMapperUsingHabaneroControl_ShouldAddBehaviours()
 {
     //---------------Set up test pack-------------------
     var updWin = new NumericUpDownWin() { Name = "TestNumericUpDown", Enabled = true };
     var comboBoxMapper = new NumericUpDownMapperStub(updWin);
     //---------------Assert Precondition----------------
     Assert.IsInstanceOf<NumericUpDown>(comboBoxMapper.Control);
     //---------------Execute Test ----------------------
     var comboBoxStrategyWin = new NumericUpDownMapperStrategyWin();
     comboBoxStrategyWin.ValueChanged(comboBoxMapper);
     //---------------Assert Result----------------------
     Assert.IsTrue(true, "If an error was not thrown then we are OK");
 }
 public void Test_AddValueChangedHandler_WhenMapperUsingControlAdapter_ShouldAddBehaviours()
 {
     //---------------Set up test pack-------------------
     var updWin = GetWinFormsControlAdapter();
     var comboBoxMapper = new NumericUpDownMapperStub(updWin);
     //---------------Assert ComboBoxMapperStub----------------
     Assert.IsInstanceOf<NumericUpDown>(comboBoxMapper.Control.GetControl());
     Assert.IsInstanceOf<NumericUpDown>(comboBoxMapper.GetControl());
     //---------------Execute Test ----------------------
     var comboBoxStrategyWin = new NumericUpDownMapperStrategyWin();
     comboBoxStrategyWin.ValueChanged(comboBoxMapper);
     //---------------Assert Result----------------------
     Assert.IsTrue(true, "If an error was not thrown then we are OK");
 }
Exemple #3
0
        public void Test_AddValueChangedHandler_WhenMapperUsingControlAdapter_ShouldAddBehaviours()
        {
            //---------------Set up test pack-------------------
            var updWin         = GetWinFormsControlAdapter();
            var comboBoxMapper = new NumericUpDownMapperStub(updWin);

            //---------------Assert ComboBoxMapperStub----------------
            Assert.IsInstanceOf <NumericUpDown>(comboBoxMapper.Control.GetControl());
            Assert.IsInstanceOf <NumericUpDown>(comboBoxMapper.GetControl());
            //---------------Execute Test ----------------------
            var comboBoxStrategyWin = new NumericUpDownMapperStrategyWin();

            comboBoxStrategyWin.ValueChanged(comboBoxMapper);
            //---------------Assert Result----------------------
            Assert.IsTrue(true, "If an error was not thrown then we are OK");
        }
Exemple #4
0
        public void Test_AddValueChangedHandler_WhenMapperUsingHabaneroControl_ShouldAddBehaviours()
        {
            //---------------Set up test pack-------------------
            var updWin = new NumericUpDownWin()
            {
                Name = "TestNumericUpDown", Enabled = true
            };
            var comboBoxMapper = new NumericUpDownMapperStub(updWin);

            //---------------Assert Precondition----------------
            Assert.IsInstanceOf <NumericUpDown>(comboBoxMapper.Control);
            //---------------Execute Test ----------------------
            var comboBoxStrategyWin = new NumericUpDownMapperStrategyWin();

            comboBoxStrategyWin.ValueChanged(comboBoxMapper);
            //---------------Assert Result----------------------
            Assert.IsTrue(true, "If an error was not thrown then we are OK");
        }