To stub out a repository to return a particular value based on like criteria, the following should work:
_repositoryStub
.Setup(x => x.Create(
Moq.It.Is<Account>(a => _maskAccount.ToExpectedObject().Equals(a))))
.Returns(_account);
To stub out a repository to return a particular value based on like criteria, the following should work:
_repositoryStub
.Setup(x => x.Create(
Moq.It.Is<Account>(a => _maskAccount.ToExpectedObject().Equals(a))))
.Returns(_account);