Suppress warning about Is.StringContaining on NUnit 3.

This commit is contained in:
RoosterDragon
2015-12-30 23:29:10 +00:00
parent f7c6938e27
commit 32bf9f7661

View File

@@ -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
}
}