public void returns_expected_command(string expectedShell, string expectedPreparedArgument, string inputAction, OperatingSystemType operatingSystemType) { var stubOperatingSystemTypeProvider = new StubOperatingSystemTypeProvider(operatingSystemType); var sut = new RealCommandFactory(stubOperatingSystemTypeProvider); var result = sut.Create(expectedShell); Assert.Equal(expectedShell, result.Shell); Assert.Equal(expectedPreparedArgument, result.PrepareArguments(inputAction)); }
public void returns_expected_custom_command(string shellDefinition, string inputAction, string expectedShell, string expectedPreparedArgument, OperatingSystemType operatingSystemType) { // !/full/path/or/alias,<args> // !/full/path/or/alias,[1=2]<args> var stubOperatingSystemTypeProvider = new StubOperatingSystemTypeProvider(operatingSystemType); var sut = new RealCommandFactory(stubOperatingSystemTypeProvider); var result = sut.Create(shellDefinition); Assert.Equal(expectedShell, result.Shell); Assert.Equal(expectedPreparedArgument, result.PrepareArguments(inputAction)); }