Ejemplo n.º 1
0
 /// <summary>
 /// Constructor to initialise a new instance of the mapper
 /// </summary>
 /// <param name="tb">The TextBox to map</param>
 /// <param name="propName">The property name</param>
 /// <param name="isReadOnly">Whether this control is read only</param>
 /// <param name="factory">the control factory to be used when creating the controlMapperStrategy</param>
 public TextBoxMapper(ITextBox tb, string propName, bool isReadOnly, IControlFactory factory)
     : base(tb, propName, isReadOnly, factory)
 {
     _textBox = tb;
     _textBoxMapperStrategy = factory.CreateTextBoxMapperStrategy();
     _oldText = "";
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor to initialise a new instance of the mapper
 /// </summary>
 /// <param name="tb">The TextBox to map</param>
 /// <param name="propName">The property name</param>
 /// <param name="isReadOnly">Whether this control is read only</param>
 /// <param name="factory">the control factory to be used when creating the controlMapperStrategy</param>
 public TextBoxMapper(ITextBox tb, string propName, bool isReadOnly, IControlFactory factory)
     : base(tb, propName, isReadOnly, factory)
 {
     _textBox = tb;
     _textBoxMapperStrategy = factory.CreateTextBoxMapperStrategy();
     _oldText = "";
 }
Ejemplo n.º 3
0
        public void Test_CorrectTextBoxMapperStrategy()
        {
            //---------------Execute Test ----------------------
            ITextBoxMapperStrategy strategy = _mapper.TextBoxMapperStrategy;

            //---------------Test Result -----------------------
            Assert.AreSame(typeof(TextBoxMapperStrategyWin), strategy.GetType());
            //---------------Tear down -------------------------
        }