Reputation: 767
I have started hooking up NUnit to my Unity project using C#/Visual Studio/etc. when I came across a brick wall. Based on the documentation, I should have access to a Multiple Assert function. I wrote a test that looks like this:
[Test]
public void Ease_TypeFall_WillMiddleCorrect() {
Vector3 value = Calcu.Ease (Calcu.EaseType.Fall, StartVector, EndVector, .5f, 1f);
Assert.Multiple (() => {
Assert.AreEqual (value.x, 6.24264f, .0001f);
Assert.AreEqual (value.y, 6.24264f, .0001f);
Assert.AreEqual (value.z, 6.24264f, .0001f);
});
}
I am getting an error on Assert.Multiple
that looks like this:
'Assert' does not contain a definition for 'Multiple'
I installed NUnit through the NuGet package manager, from what I can tell, I have the latest version installed and All portions of it. After some Googling, I haven't seen anyone with a similar issue to mine.
I can obviously split this into 3 asserts, but it would really be nice to know what I'm doing wrong here.
Upvotes: 4
Views: 4990
Reputation: 13726
Unity provides a modified version of the nunit framework, which unfortunately has the same name as the standard nunit framework. It's a known issue of theirs that Assert.Multiple is not yet supported.
Upvotes: 2