Hi all,
I have a method that I want to test which hits the database. From what I have read this is a perfect oppurtunity to use a mock. However the problem that I am facing is that I pass the object a string and then it creates an object and hits the db with this object i.e.
public void test(string t)
{
Test t1 = new Test(t);
db.Save(t1);
}
Then the in the test I have:
using(mockery.Record)
{
Expect.Call(db.Save( ??? ))
}
The problem being - what do I expect here? A call to:
Expect.call(db.Save(new Test(t))
does not work.
As I am new to mocking this may be an easy question, but any help will be much appreciated.
thanks