Sorry for the slightly criptic subject but I can't think of a short way to explain my problem.
If I have a method to test which does the following
TestClass1 TestObject1 = new TestClass1();
TestClass2 TestObject2 = new TestClass2();
TestObject1.TestMethod(TestObject2);
And I setup my mocks in my test as so
Mock MockTestClass1 = MockManager.Mock(typeof(TestClass1));
Mock MockTestClass2 = MockManager.Mock(typeof(TestClass2));
MockTestClass1.ExpectCall("TestMethod").Args((TestClass2)MockTestClass2.MockedInstance);
Then obviously this wont work as at the time I am setting my expectations the TestObject2 has not been created and therefore MockTestClass2.MockedInstance is null and so I cannot use this to validate the argument.
Has anyone any ideas How I can check that the method creates TestObject 2 and passes this as the parameter for TestMethod.