public void WhenValueIsNotNullOrEmpty_ThenSet() { var sut = new CaseToLowerCommand().SetValue("John Smith"); sut.Execute(); Assert.That(sut.Result, Is.EqualTo("john smith")); }
public void WhenValueIsNullOrEmpty_ThenSetToValue(string value) { var sut = new CaseToLowerCommand().SetValue(value); sut.Execute(); Assert.That(sut.Result, Is.EqualTo(value)); }
public void WhenCommandSet_ThenExecuteCommand() { var command = new CaseToLowerCommand().SetValue("John Smith"); _sut.SetCommands(command); _sut.Invoke(); Assert.That(command.Result, Is.EqualTo("john smith")); }
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(); }