public void NoParameters() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); // It's invalid to have zero parameters, so we expect a "false" return value from ValidateParameters. Assert.IsFalse(CommandLine.CallValidateParameters(t)); }
public void OnlyTargetPath() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); t.TargetPath = @"c:\MyTarget"; // This is not valid. Either MetabasePath or VirtualPath must be specified. Assert.IsFalse(CommandLine.CallValidateParameters(t)); }
public void OnlyVirtualPath() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); t.VirtualPath = @"/MyApp"; // This should be valid. Assert.IsTrue(CommandLine.CallValidateParameters(t)); CommandLine.ValidateEquals(t, @"-v /MyApp", false); }
public void OnlyMetabasePath() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); t.MetabasePath = @"/LM/W3SVC/1/Root/MyApp"; // This should be valid. Assert.IsTrue(CommandLine.CallValidateParameters(t)); CommandLine.ValidateEquals(t, @"-m /LM/W3SVC/1/Root/MyApp", false); }
public void MetabasePathAndVirtualPath() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); t.MetabasePath = @"/LM/W3SVC/1/Root/MyApp"; t.VirtualPath = @"/MyApp"; // This is not valid. Can't specify both MetabasePath and (VirtualPath or PhysicalPath). Assert.IsFalse(CommandLine.CallValidateParameters(t)); }
public void AllExceptMetabasePath() { AspNetCompiler t = new AspNetCompiler(); t.BuildEngine = new MockEngine(); t.VirtualPath = @"/MyApp"; t.PhysicalPath = @"c:\MyApp"; t.TargetPath = @"c:\MyTarget"; // This is valid. Assert.IsTrue(CommandLine.CallValidateParameters(t)); CommandLine.ValidateEquals(t, @"-v /MyApp -p c:\MyApp c:\MyTarget", false); }
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.IsTrue(CommandLine.CallValidateParameters(t)); CommandLine.ValidateEquals(t, @"-m /LM/W3SVC/1/Root/MyApp c:\MyTarget", false); }