void GivenTheAppWasRunWithArgumentsThatDoNotContainSpaces() { _installedVersion = new Version(1, 0); _builder = new AppUpdaterBuilder(TestConstants.AppPackageId) .SetupWithTestValues(_installedVersion); _commandLineWrapper = _builder.GetSubsituteCommandLineWrapper(); _processWrapper = _builder.GetSubsituteProcessWrapper(); _commandLineWrapper.Full.Returns(@".\myapp.exe -v1 -updatemode autoupdate"); _commandLineWrapper.Arguments.Returns(new[] { @".\myapp.exe", "-v1", "-updatemode", "autoupdate" }); }
void GivenTheAppWasRunWithAPathThatContainsSpacesAndArgumentsThatDoContainSpaces() { _installedVersion = new SemanticVersion(new Version(1, 0)); _builder = new AppUpdaterBuilder(TestConstants.AppPackageId) .SetupWithTestValues(_installedVersion); _commandLineWrapper = _builder.GetSubsituteCommandLineWrapper(); _processWrapper = _builder.GetSubsituteProcessWrapper(); _commandLineWrapper.Full.Returns("\"C:\\Program Files\\myapp.exe\" -v1 -updatemode \"auto update\""); _commandLineWrapper.Arguments.Returns(new[] { "C:\\Program Files\\myapp.exe", "-v1", "-updatemode", "auto update" }); }
void GivenTheAppWasRunWithAPathThatContainsSpacesAndArgumentsThatDoContainSpaces() { _installedVersion = new Version(1, 0); _builder = new AppUpdaterBuilder(TestConstants.AppPackageId) .SetupWithTestValues(_installedVersion); _commandLineWrapper = _builder.GetSubsituteCommandLineWrapper(); _processWrapper = _builder.GetSubsituteProcessWrapper(); _commandLineWrapper.Full.Returns("\"C:\\Program Files\\myapp.exe\" -v1 -updatemode \"auto update\""); _commandLineWrapper.Arguments.Returns(new[] { "C:\\Program Files\\myapp.exe", "-v1", "-updatemode", "auto update" }); }
void GivenTheAppWasRunWithNoArguments() { _installedVersion = new Version(1, 0); _builder = new AppUpdaterBuilder(TestConstants.AppPackageId) .SetupWithTestValues(_installedVersion); _commandLineWrapper = _builder.GetSubsituteCommandLineWrapper(); _processWrapper = _builder.GetSubsituteProcessWrapper(); _commandLineWrapper.Full.Returns(@"\.myapp.exe"); _commandLineWrapper.Arguments.Returns(new[] { @"\.myapp.exe" }); }