Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public void ShouldThrowExceptionInGetCommandIfTextboxIsNull()
 {
     ReturnKey.GetCommand(null);
 }