#region CPL License /* Nuclex.NAnt.Tasks Copyright (C) 2009 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #endregion #if UNITTEST using System; using System.Collections.Generic; using System.IO; using NUnit.Framework; namespace Nuclex.NAnt.Tasks.Helpers { /// Unit tests for the SevenZipLocator class [TestFixture] public class SevenZipLocatorTest { /// /// Verifies that the Locate() method can be called after locating 7-Zip once /// [Test] public void TestReLocate() { string location = SevenZipLocator.Location; SevenZipLocator.Locate(); } /// Verifies that the Location property can be queried [Test] public void TestLocation() { Assert.IsTrue( (SevenZipLocator.Location == null) || File.Exists(SevenZipLocator.Location) ); } } } // namespace Nuclex.NAnt.Tasks.Helpers #endif // UNITTEST