adding HasError method (#2185)

Makes it easier to write error message within weaver tests because there is mess syntax to worry about
This commit is contained in:
James Frowen 2020-08-22 16:23:56 +01:00 committed by GitHub
parent 9ec5eadd51
commit f1d7f207c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,11 @@ public void TestSetup()
BuildAndWeaveTestAssembly(className, TestContext.CurrentContext.Test.Name); BuildAndWeaveTestAssembly(className, TestContext.CurrentContext.Test.Name);
} }
protected void HasError(string messsage, string atType)
{
Assert.That(weaverErrors, Contains.Item($"{messsage} (at {atType})"));
}
} }
[TestFixture] [TestFixture]
[Category("Weaver")] [Category("Weaver")]