The problem that you are stating is quite strange.
I guess that there are some dependancies between the tests.
To solve tell we need your help in investigating this.
a. If you stop the rocket and run all the tests, do you get this problem?
b. Is the mocked type a System type?
nope. it's one of my own classes.
c. Do you always MockManager.Init() before each TypeMocked test?
d. Can you send me the TypeMock.out log (you can do this by setting: MockManager.LogFile=true in the first Test that is run), the file will be in the TestDriven.Net bin directory. [Showing the part from the failing test method name till the next test method is sufficiant]
here's my TypeMock'ed method:
public void TestAuthenticateNewCustomerMock()
Mock store = MockManager.Mock(typeof(Egrocer.BLL.Store));
Customer customer = new Customer();
CustomerInfo customerDetails = customer.AuthenticateCustomer(m_BadPostalCode);
Mock store2 = MockManager.Mock(typeof(Egrocer.BLL.Store));
store2.ExpectAndReturn("GetStore",new StoreInfo(StoreId,m_Name,m_Description,m_AddressId,m_MinimumOrder, m_Tax1Description, m_Tax2Description, m_PreferredAt, m_PreauthRate, m_RedeliveryCharge, m_CancellationRate, m_ElevatorFee, m_FreeDeliveries, m_SubstitutionDiscountRate, m_FreeLateChanges, m_FreeLateChangeWindow));
customerDetails = customer.AuthenticateCustomer(m_GoodPostalCode);
Any other tests in this fixture that call methods that call methods on "Store" get that System.NullReferenceException.
where should i sent the TypeMock.out file?