Is the NUnit SetUpFixture attribute equivalent in xUnit?

At nUnit, SetUpFixture allowed me to run some code before any tests. Is there anything similar when using xUnit?


From the nUnit documentation :

This is an attribute that marks a class that contains one-time setup or disassembly methods for all test fixtures under a given namespace.

+5
source share
2 answers

xUnit shows that where you would use [TestFixtureSetUp]in NUnit, you create your class test txt> IUseFixture<T>.


If [TestFixtureSetUp]it is not the attribute you are looking for, then the header at the beginning of the compatibility table indicates that there is no equivalent:

. , , xUnit.net.

+5

xunit . ( )

+2

All Articles