예제 #1
0
        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" });
        }
예제 #2
0
        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 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 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" });
        }
        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" });
        }