From 32bf9f76611497c0cfdf912b2a46d6930f4211c7 Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Wed, 30 Dec 2015 23:29:10 +0000 Subject: [PATCH] Suppress warning about Is.StringContaining on NUnit 3. --- OpenRA.Test/OpenRA.Game/ActorInfoTest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Test/OpenRA.Game/ActorInfoTest.cs b/OpenRA.Test/OpenRA.Game/ActorInfoTest.cs index 5f8211e89a..14b676f3b6 100644 --- a/OpenRA.Test/OpenRA.Game/ActorInfoTest.cs +++ b/OpenRA.Test/OpenRA.Game/ActorInfoTest.cs @@ -64,11 +64,14 @@ namespace OpenRA.Test } catch (Exception e) { + // Is.StringContaining is deprecated in NUnit 3, but we need to support NUnit 2 so we ignore the warning. + #pragma warning disable CS0618 Assert.That(e.Message, Is.StringContaining("MockA")); Assert.That(e.Message, Is.StringContaining("MockB")); Assert.That(e.Message, Is.StringContaining("MockC")); Assert.That(e.Message, Is.StringContaining("MockInherit"), "Should recognize base classes"); Assert.That(e.Message, Is.StringContaining("IMock"), "Should recognize interfaces"); + #pragma warning restore CS0618 } }