Ejemplo n.º 1
0
            public void RootSuffix(string option, string rootsuffix)
            {
                var consoleContext = new TestConsoleContext();

                var commandLine = Program.ParseCommandLine(consoleContext, option, rootsuffix);

                Assert.That(commandLine.RootSuffix, Is.EqualTo(rootsuffix));
            }
Ejemplo n.º 2
0
            public void Version_ExpectException(string option, string version, string exceptionMessage)
            {
                var consoleContext = new TestConsoleContext();

                var exception = Assert.Throws <Exception>(() => Program.ParseCommandLine(consoleContext, option, version));

                Assert.That(exception.Message, Is.EqualTo(exceptionMessage));
            }
Ejemplo n.º 3
0
            public void Version(string option, string version, VsVersion vsVersion)
            {
                var consoleContext = new TestConsoleContext();

                var commandLine = Program.ParseCommandLine(consoleContext, option, version);

                Assert.That(commandLine.VsVersion, Is.EqualTo(vsVersion));
            }
Ejemplo n.º 4
0
            public void ToolActionNoArg(string option, ToolAction toolAction)
            {
                var consoleContext = new TestConsoleContext();

                var commandLine = Program.ParseCommandLine(consoleContext, option);

                Assert.That(commandLine.ToolAction, Is.EqualTo(toolAction));
            }
Ejemplo n.º 5
0
            public void NoArg_Help()
            {
                var consoleContext = new TestConsoleContext();

                var commandLine = Program.ParseCommandLine(consoleContext);

                Assert.That(commandLine.ToolAction, Is.EqualTo(ToolAction.Help));
            }
Ejemplo n.º 6
0
            public void SingleArg_Install()
            {
                var consoleContext = new TestConsoleContext();
                var vsixFile       = "foo.vsix";

                var commandLine = Program.ParseCommandLine(consoleContext, vsixFile);

                Assert.That(commandLine.ToolAction, Is.EqualTo(ToolAction.Install));
                Assert.That(commandLine.Arg, Is.EqualTo(vsixFile));
            }