public RemovePositionTextForm(RemovePositionTextCommand removePositionTextCommand, int id) { InitializeComponent(); _removePositionTextCommand = removePositionTextCommand; _id = id; UpdateUiFromOperation(); }
public void WhenLengthIsLessThanZero_ShouldRemoveNoText() { var classUnderTest = new RemovePositionTextCommand(3, -1); classUnderTest.Execute(OriginalText); Assert.That(classUnderTest.Result, Is.EqualTo(OriginalText)); }
public void WhenPositionIsGreaterThanOriginalStringLength_ShouldRemoveNoText() { var classUnderTest = new RemovePositionTextCommand(OriginalText.Length + 1, 3); classUnderTest.Execute(OriginalText); Assert.That(classUnderTest.Result, Is.EqualTo(OriginalText)); }
public void WhenPositionIsLessThanZero_ShouldRemoveFromPositionZero() { var classUnderTest = new RemovePositionTextCommand(-1, 3); classUnderTest.Execute("my original string"); Assert.That(classUnderTest.Result, Is.EqualTo("original string")); }
public void WhenPositionAndLengthWithinString_ShouldRemoveText() { var classUnderTest = new RemovePositionTextCommand(3, 9); classUnderTest.Execute("my original string"); Assert.That(classUnderTest.Result, Is.EqualTo("my string")); }