NUnitLite doesn't support either of those alternatives. In the case of
the SuiteAttribute, it's fairly old and it may not be supported in
future releases of NUnit.
SetUpFixtureAttribute will eventually be supported in NUnitLite, but
it's not in any current releases, including the current Beta.
Absent SetUpFixture, the best way to perform common initialization is
using inheritance. Put the common setup/teardown in a
TestFixtureSetUp/TestFixtureTearDown method in the base class. If you
want it to be executed once per fixture, that's all you have to do. If
you want to have onetime setup and teardown, it's a bit more
complicated.
For setup, use a static flag to indicate whether the setup has been
performed in this run. If it has been performed once, then don't
execute your code.
Teardown is harder. Try to avoid one time teardown until we have a
SetUpFixture. The hack to do it is to have each one time setup
increment a static (!) counter. Your onetime teardown should decrement
the counter and only execute its code when it reaches zero. Best to
avoid this, however.
SetUpFixture will be supported in the version of NUnitLite that comes
out with NUnit 3.0, expected around year end.
Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnitLite" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
nunitlite+...@googlegroups.com.
> To post to this group, send email to
nuni...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/nunitlite.
> For more options, visit
https://groups.google.com/groups/opt_out.