Example #1
0
 public void BuildProjectFileWithNullGlobalProperties
     (
     )
 {
     string[] targets;
     MockEngine myEngine = new MockEngine();
     string projectFile = CreateGlobalPropertyProjectFile();
     try
     {
         targets = new string[1];
         targets[0] = "Build";
         bool result = myEngine.BuildProjectFile(projectFile, targets, null);
         myEngine.AssertLogDoesntContain("SomePropertyText");
         Assert.IsTrue(result);
     }
     finally
     {
         myEngine.UnregisterAllLoggers();
         myEngine.UnloadAllProjects();
         File.Delete(projectFile);
     }
 }
Example #2
0
 public void BuildProjectFileWithGlobalPropertiesSetInEngineObjectWithProjectFileAndTargetListSpecified
     (
     )
 {
     string[] targets;
     MockEngine myEngine = new MockEngine();
     string projectFile = CreateGlobalPropertyProjectFile();
     try
     {
         targets = new string[1];
         targets[0] = "Build";
         myEngine.GlobalProperties.SetProperty("MyGlobalProp", "SomePropertyText");
         myEngine.BuildProjectFile(projectFile, targets);
         myEngine.AssertLogContains("SomePropertyText");
     }
     finally
     {
         myEngine.UnregisterAllLoggers();
         myEngine.UnloadAllProjects();
         File.Delete(projectFile);
     }
 }