I encountered this NUnit message in a test fixture that had the following method:
[TearDown] private void AfterEachTest() { _repository.VerifyAllExpectations(); }
NUnit doesn’t allow methods decorated with [SetUp] or [TearDown] attributes to be private. Change the access to public or protected to resolve the problem.
Leave a comment