c# - Nunit SetupUpFixture syntax -
c# - Nunit SetupUpFixture syntax -
what proper syntax utilize when trying implement setupfixture ability in nunit. have maintain getting error:
namespace testing { [setupfixture, requiressta] public class setupclass { public ie cassite = new ie("awebsite"); [setup] public void setup() { } [teardown] public void teardown() { cassite.dispose(); } } [testfixture, requiressta] public class tests : setupclass { [test] public void dosomething() { } } }
the error maintain receiving : failure: testfixturesetup failed in setupclass
do have more 1 setupfixture
defined namespace testing
?
per docs,
only 1 setupfixture should created in given namespace.
your tests
class derives setupfixture
class. don't need that. setupfixture
class' setup
, teardown
run automatically classes in namespace.
c# unit-testing nunit
Comments
Post a Comment