Hi. InvoiceDAO is a public class, with a parameterless constructor.
Also, GetInvoicesByConstraint is declared as virtual. If I have the
following:
InvoiceDAO dao =
MockRepository.GenerateMock<DataLayer.DAO.InvoiceDAO>();
dao.Expect(d =>
d.GetInvoicesByConstraint(Arg<InvoiceConstraints>.Is.Anything)).Return(new
List<Invoice>() { new Invoice() });
Assert.AreEqual(dao.GetInvoicesByConstraint(null).Count, 1);
how would I go about getting this test to pass? The method returns
null as is, so I end up with a null reference exception.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhinomocks?hl=en.