Ejemplo n.º 1
0
        public void OnlyVirtualPath()
        {
            AspNetCompiler t = new AspNetCompiler();

            t.BuildEngine = new MockEngine();

            t.VirtualPath = @"/MyApp";

            // This should be valid.
            Assert.True(CommandLine.CallValidateParameters(t));

            CommandLine.ValidateEquals(t, @"-v /MyApp", false);
        }
Ejemplo n.º 2
0
        public void OnlyMetabasePath()
        {
            AspNetCompiler t = new AspNetCompiler();

            t.BuildEngine = new MockEngine();

            t.MetabasePath = @"/LM/W3SVC/1/Root/MyApp";

            // This should be valid.
            Assert.True(CommandLine.CallValidateParameters(t));

            CommandLine.ValidateEquals(t, @"-m /LM/W3SVC/1/Root/MyApp", false);
        }
Ejemplo n.º 3
0
        public void AllExceptTargetPath()
        {
            AspNetCompiler t = new AspNetCompiler();

            t.BuildEngine = new MockEngine();

            t.MetabasePath = @"/LM/W3SVC/1/Root/MyApp";
            t.VirtualPath  = @"/MyApp";
            t.PhysicalPath = @"c:\MyApp";

            // This is not valid.  Can't specify both MetabasePath and (VirtualPath or PhysicalPath).
            Assert.False(CommandLine.CallValidateParameters(t));
        }
Ejemplo n.º 4
0
        public void VirtualPathAndTargetPath()
        {
            AspNetCompiler t = new AspNetCompiler();

            t.BuildEngine = new MockEngine();

            t.VirtualPath = @"/MyApp";
            t.TargetPath  = @"c:\MyTarget";

            // This is valid.
            Assert.IsTrue(CommandLine.CallValidateParameters(t));

            CommandLine.ValidateEquals(t, @"-v /MyApp c:\MyTarget", false);
        }
Ejemplo n.º 5
0
        public void MetabasePathAndTargetPath()
        {
            AspNetCompiler t = new AspNetCompiler();

            t.BuildEngine = new MockEngine();

            t.MetabasePath = @"/LM/W3SVC/1/Root/MyApp";
            t.TargetPath   = @"c:\MyTarget";

            // This is valid.
            Assert.True(CommandLine.CallValidateParameters(t));

            CommandLine.ValidateEquals(t, @"-m /LM/W3SVC/1/Root/MyApp c:\MyTarget", false);
        }
Ejemplo n.º 6
0
        public void VerbosityNormal()
        {
            IBuildEngine2 mockEngine = new MockEngine();
            Vbc           t          = new Vbc();

            t.BuildEngine = mockEngine;

            t.Verbosity = "Normal";
            t.Sources   = new TaskItem[] { new TaskItem("a.vb") };
            Assert.IsTrue(CommandLine.CallValidateParameters(t), "Vbc task didn't accept 'normal' for the Verbosity parameter");
            CommandLine.ValidateNoParameterStartsWith(t, @"/quiet");
            CommandLine.ValidateNoParameterStartsWith(t, @"/verbose");
            CommandLine.ValidateNoParameterStartsWith(t, @"/normal");
        }