or
the ProcessFilterResult checks some dates and a flag on the target, all of which pass. It uses some regex to find matches in the MailMessage.BodyText, which also match the asserted method call. Stepping through the code, I watch the result and data proxies match up to the Mocked objects and then watch the target._dal.RecordBouncedEmail() method call being called, but when I get back to the test code I still get the following exception. Telerik.JustMock.MockAssertionException was unhandled by user code[TestMethod]publicvoidProcessFilterResult_MailMessageDate_AfterLatestDBDate_ProcessesMessage_Test(){BounceHandler_Accessor target =newBounceHandler_Accessor();var data = Mock.Create<IDataAccess>();target._dal = data;Mock.Arrange( () => data.GetLatestEmailDate() ).Returns( DateTime.Now.AddDays( -7 ) );target._recordToDatabase =true;var result = Mock.Create<BounceFilterResult>();Cforge.Net.Mail.MailMessage msg =newCforge.Net.Mail.MailMessage();msg.Date =newCforge.Net.Mime.Headers.MailDateTime(DateTime.Now);msg.BodyText = @"X-ETC-MailingID: 00001X-ETC-MailflowID: 10000";Mock.Arrange( () => result.MailMessage ).Returns( msg );target.ProcessFilterResult( result );Mock.Assert( () => data.RecordBouncedEmail( result,"00001","10000"), Occurs.Once() );}
Message=Expected call on the mock should be once, but it was called 0 time(s).
Source=Telerik.JustMock Can anyone give me some idea what the problem might be?
TransactionHeaderViewModel
ticket = Mock.Create<TransactionHeaderViewModel>();