예제 #1
0
            public void ShouldHandleJustScriptArgs()
            {
                // Arrange
                var args = new[] { "--", "-port", "8080" };

                // Act
                string[] scriptArgs;
                ScriptCsArgs.SplitScriptArgs(ref args, out scriptArgs);

                // Assert
                args.ShouldEqual(new string[0]);
                scriptArgs.ShouldEqual(new[] { "-port", "8080" });
            }
예제 #2
0
            public void ShouldHandleExtraDoubledash()
            {
                // Arrange
                var args = new[] { "scriptname.csx", "-restore", "--", "-port", "--", "8080" };

                // Act
                string[] scriptArgs;
                ScriptCsArgs.SplitScriptArgs(ref args, out scriptArgs);

                // Assert
                args.ShouldEqual(new[] { "scriptname.csx", "-restore" });
                scriptArgs.ShouldEqual(new[] { "-port", "--", "8080" });
            }
예제 #3
0
            public void ShouldHandleMissingDoubledash()
            {
                // Arrange
                var args = new[] { "scriptname.csx", "-restore" };

                // Act
                string[] scriptArgs;
                ScriptCsArgs.SplitScriptArgs(ref args, out scriptArgs);

                // Assert
                args.ShouldEqual(new[] { "scriptname.csx", "-restore" });
                scriptArgs.ShouldEqual(new string[0]);
            }