Hi
I'm trying to write a test using Rhino Mocks 3.6 with AAA. The problem I'm running into is that the Stub i've set up doesn't seem to be returning the correct object.
The following test fails:
[SetUp]
public void SetUp()
{
repository = new MockRepository();
webUserDal = repository.Stub<IWebUserDal>();
}
[Test]
public void Test()
{
var user1 = new WebUser{Status = Status.Active, Email = "[email protected]"};
webUserDal.Stub(x => x.Load(Arg<string>.Is.Anything)).Return(user1);
var user2 = webUserDal.Load("[email protected]");
Assert.AreEqual(user1.Email, user2.Email);
}
User1's email property is [email protected] while user2's email property is null
Could anyone shed some light on what I'm doing wrong?