public void GetBuildComponentTest() { BuildFile bf = TestData.BuildFile; BuildComponent bc1 = bf.GetBuildComponent("Core"); Assert.AreEqual(bc1.Name, "Core"); BuildComponent bc2 = bf.GetBuildComponent("TestComponent"); Assert.AreEqual(bc2.Name, "TestComponent"); Assert.AreEqual(1, bc2.Actions.Count); }
public void RunBuildScriptTestToolSpecificComponent() { BuildFile bf = new BuildFile(); bf.LoadXmlFile(@"..\..\Scenario\TestTool.xml"); if (Directory.Exists(TestUtility.TempDir + @"TestTool")) { Directory.Delete(TestUtility.TempDir + @"TestTool", true); } List <IBuildFileElement> elements = (List <IBuildFileElement>)bf.GetBuildComponentWithRootActions("TestLibrary"); new BuildFileElementExecutor().ExecuteElements(elements); Assert.IsTrue(File.Exists(TestUtility.TempDir + @"TestTool\TestLibrary.dll")); Assert.IsTrue(!File.Exists(TestUtility.TempDir + @"TestTool\TestApplication.exe")); elements.Clear(); elements.Add(bf.GetBuildComponent("JavaApp")); new BuildFileElementExecutor().ExecuteElements(elements); Assert.IsTrue(File.Exists(TestUtility.TempDir + @"TestTool\JavaApp.class")); Directory.Delete(TestUtility.TempDir + @"TestTool", true); }