Пример #1
0
        public void ShouldGetAndSeReturnKeytProperties()
        {
            var          textBox     = new TextBox();
            const string defaultText = "Default Text";

            var command = new MockCommand();

            ReturnKey.SetCommand(textBox, command);
            Assert.AreEqual(command, ReturnKey.GetCommand(textBox));

            ReturnKey.SetDefaultTextAfterCommandExecution(textBox, defaultText);
            Assert.AreEqual(defaultText, ReturnKey.GetDefaultTextAfterCommandExecution(textBox));
        }
Пример #2
0
 public void ShouldThrowExceptionInSetCommandIfTextboxIsNull()
 {
     ReturnKey.SetCommand(null, new MockCommand());
 }