However if reflective mocks used it works. I'm new to TypeMock and had evaluation version installed. I don't know whether it's because evaluation version doesn't support natural mocks(not expired yet) or my code that's listed as follows is not right. Basically, i set up a mock method call which pass in an initialized object and return another initialized object. However, i got strange behaviors, like "Transactions[0].groupID is not set, use recorder.return()", but it's been setup. I'm wondering whether " the recorder will mock everything inside using block" cause my pass-in and return object has incorrect behavior. If i implemented in reflective mocks, it works fine.Any ideas? Thanks!
public void GetRecordsToSendTest1()
{
NBSInterfaceQueue target = new NBSInterfaceQueue();
using (RecordExpectations record = RecorderManager.StartRecording())
{
//all the method calls will be mocked
//initializtion
Business Object
ApprovedTransactionCollectionDO transactions = new ApprovedTransactionCollectionDO(ds);
Business Object
FinancialTransactionDO fs = new FinancialTransactionDO();
//GroupID is a property of fs object
//set up expectations
TransactionDALC.GetRelatedFinancialTransactionByGroupID(transactions[0].GroupID);
record.Return(fs);
fs.GroupID = transactions[1].GroupID;
}