public void InsertByPosition01_BeginningOneLetter() { CommandInsertByPosition command = new CommandInsertByPosition(0, BeginningEnd.Beginning, "X"); directoryFileName_01 = command.Execute(directoryFileName_01); Assert.AreEqual(directoryFileName_01.FullName, @"c:\temp\Xtest.txt"); }
public ICommand GetCommand() { ICommand command; if (radioButtonByPosition.Checked) { // Insert by position command = new CommandInsertByPosition((int)numericUpDownInsert.Value, BeginningEnd.Beginning, textBoxInsert.Text); } else { // Insert by text command = new CommandInsertByText(textBoxSearch.Text, radioButtonTextBefore.Checked, textBoxInsert.Text); } return command; }