Esempio n. 1
0
        public void WhenValueIsNotNullOrEmpty_ThenSet()
        {
            var sut = new CaseToLowerCommand().SetValue("John Smith");

            sut.Execute();

            Assert.That(sut.Result, Is.EqualTo("john smith"));
        }
Esempio n. 2
0
        public void WhenValueIsNullOrEmpty_ThenSetToValue(string value)
        {
            var sut = new CaseToLowerCommand().SetValue(value);

            sut.Execute();

            Assert.That(sut.Result, Is.EqualTo(value));
        }
Esempio n. 3
0
            public void WhenCommandSet_ThenExecuteCommand()
            {
                var command = new CaseToLowerCommand().SetValue("John Smith");

                _sut.SetCommands(command);
                _sut.Invoke();

                Assert.That(command.Result, Is.EqualTo("john smith"));
            }
Esempio n. 4
0
            public void WhenCommandsSet_ThenExecuteCommands()
            {
                var c1 = new CaseToLowerCommand().SetValue("John Smith");
                var c2 = new CopyPasteCommand(0, 4, 0).SetValue("John Smith");

                _sut.SetCommands(c1, c2);
                _sut.Invoke();

                Assert.That(c1.Result, Is.EqualTo("john smith"));
                Assert.That(c2.Result, Is.EqualTo("JohnJohn Smith"));
            }
 public void SetUp()
 {
     _classUnderTest = new CaseToLowerCommand();
 }