using System.Linq; using Deltares.Dam.Data; using Deltares.Dam.Data.License; using NUnit.Framework; namespace Deltares.Dam.Tests.License { [TestFixture] public class LicenseTest { private const string dAuthFeature = "DGS_26_00"; [Test] [Ignore("Test only successful if valid LFM license is available")] public void CanCheckout() { // Only major version is relevant DamLicense.CheckoutLicense("17.1.1.1"); Assert.IsTrue(DamLicense.DamLicenseType == DamLicenseType.LFM); DamLicense.CheckinLicense(); } [Test] [Ignore("Test only successful if valid LFM license is available")] public void CanGetFullFeatureName() { var featureNames = DamLicense.GetAllFeaturesStartingWith(dAuthFeature); Assert.AreEqual("DGS_26_00", featureNames.FirstOrDefault()); } } }