3 ms·
The test that you picked is specifically there to test that call. Did you not see: Any.CallTo(store).WithReturnType<User>().Returns(user); Also, two of the
by latch 16y ago
The test that you picked is specifically there to test that call. Did you not see:
Any.CallTo(store).WithReturnType<User>().Returns(user);
Also, two of the tests have seen been updated to truly leverage FakeItEasy's stubbing capabilities:
[Test]
public void ReturnsNullIfThePasswordsDontMatch()
{
var store = A.Fake<IDataStore>();
var encryption = A.Fake<IEncryption>();
A.CallTo(() => encryption.CheckPassword(null, null)).WithAnyArguments().Returns(false);
var user = new UserRepository(store, encryption).FindByCredentials(null, null);
Assert.IsNull(user)
}
There's no setup/expectation on the store - it'll just returned a canned (default new user) response.