I\'ve been using Typemock for less than a day so be gentle.
I\'ve got a group of tests that all pass when ran individually, but fails a few when I run them all (via Unit Test Runner in VS2003).
Looking at the trace for the first failed test, I see there is an Instance 1 and an Instance -1. What should this tell me?
Here\'s some of the code leading up to the first failed test:
private Mock GetMockOneCardServiceConnected()
Mock serviceMock = MockManager.MockAll(typeof (OneCardService));
ServiceResult verifyResult = new ServiceResult();
verifyResult.Success = true;
verifyResult.Authenticated = true;
private BridgeServiceResult GetBridgeServiceResultSucess()
BridgeServiceResult serviceResult = new BridgeServiceResult();
serviceResult.Success = true;
serviceResult.Authenticated = true;
private IOneCardConnection GetConnection()
IOneCardConnection conn = new OneCardConnection(\"userName\", \"password\", \"http://localhost\");
System.Threading.Thread.Sleep(2000); //wait for the timer to fire so we get connected to the OPR
public void TestAddRedemptionNoError()
Mock serviceMock = GetMockOneCardServiceConnected();
IOneCardConnection connection = GetConnection();
BridgeServiceResult result = connection.AddRedemption(1, -1, \'D\', 1, 1);
Assert.IsTrue(result.Success, \"AddRedemption not successfull\");
All help appreciated.
On a slightly different note... How do verify that a specific method isn\'t called? Something like Expect.Never(...)