using System; using System.IO; using NUnit.Framework; using NAnt.Core.Tasks; using Tests.NAnt.Core; namespace Tests.NAnt.SourceControl.Tasks { /// /// Test that the checkout command brings down the master.build /// file from the nant repository to the specified directory. /// [TestFixture] public class CheckoutTaskTest : BuildTestBase { private static readonly String cvsTempPath = Path.Combine (Path.GetTempPath (), "cvscheckout-test"); private static readonly String TEST_FILE = Path.Combine (cvsTempPath, "nant/NAnt.build"); private readonly String _projectXML = @" "; /// /// Test that the directory for the cvs checkout gets created and /// that at least the master.build file comes down from the /// repository. /// [Test] public void Test_CvsCheckout () { System.Console.WriteLine (_projectXML); String result = this.RunBuild (_projectXML); Assertion.Assert ("File does not exist, checkout probably did not work.", File.Exists (TEST_FILE)); } /// /// Remove the directory created by the checkout/ update. /// [TearDown] protected override void TearDown () { base.TearDown (); //Directory.Delete ("c:/temp/cvscheckout-test", true); } } }