Open MeikelLP opened 4 years ago
Jesus christ, I'm glad I found this cause I was pulling my hair out trying to figure out why UnitySetUp and UnityTearDown attributes weren't working. It's not even throwing an exception, it just doesn't call the methods at all.
With Unity's test framework there is an attribute
UnitySetUp
which are equal to the normalSetUp
from NUnit except that this will be called from Unity as a coroutine. So we must declare it asIEnumerator
.The same goes for
UnityTearDown
&UnityTest
.Would be lovely if Rider would warn you about that because Unity will throw an exception if the method is a void... A quick fix would be awesome too :)
Reference: