Hi,
Can Fakes be created in NUnit Setup methods? I've looked all over the documentation and forum and I can't find anywhere that says they can't be used. However I can't find one Typemock sample that uses a SetUp method.
When I use SetUp methods it appears that the faked objects are still being used in a tests defined in a class that run after the tests that use the faked objects. Yes I have the Isolated attribute on the class that uses Isolator.
I have the following situation
1. Static class w/static methods that creates a needed object.
- I want to fake the static create method to return a faked instance of the
object the static create method creates
2. Singleton that gets created w/Object created my static class/methods
Argh - that was hard to explain.
Test A uses Isolator to create fakes. Test verifies that Single.Instance is not null.
Test B ( in a different test class that does not use Isolator ). Test again verifies that Singleton.Instance is not null - I expect this test to fail.(Static method throw NotImplementedException)
Test A Passes when I run it alone.
Test B Fails when I run it alone. -> This is expected.
Test B passes when I run A,B together w/B after A.
I have a sln that recreates this problem.
Environment
VS 2008 SP1
Typemock 6.0.6.0
Vista
Thanx
John A.
[/code]