Index: DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs
===================================================================
diff -u -r875 -r1918
--- DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/AuthorizationTestBase.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/AuthorizationTestBase.cs (.../trunk/src/Dam/Tests/AuthorizationTestBase.cs) (revision 1918)
@@ -1,3 +1,24 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program 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
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -13,6 +34,7 @@
[TestFixture]
public abstract class AuthorizationTestBase
{
+ private const string LicenseNotFoundMessage = "could not checkout/borrow license";
///
/// Gets the feature name for that exists.
///
@@ -44,7 +66,8 @@
using (var aw = new DAuthClient(false, true))
{
Assert.IsFalse(aw.CheckOut("NotFound", "1.0"));
- Assert.IsTrue(aw.GetLastErrorMessage().Contains("could not borrow license"));
+ var errorMessage = aw.GetLastErrorMessage();
+ Assert.IsTrue(errorMessage.Contains(LicenseNotFoundMessage));
}
}
@@ -63,7 +86,8 @@
{
Assert.IsFalse(aw.CheckOut(feature, unsupportedFeatureVersion),
string.Format("{0} - {1} accepted while it shouldn't.", feature, unsupportedFeatureVersion));
- Assert.IsTrue(aw.GetLastErrorMessage().Contains("could not borrow license"));
+ var errorMessage = aw.GetLastErrorMessage();
+ Assert.IsTrue(errorMessage.Contains(LicenseNotFoundMessage));
}
}
}