public async Task UserEmailStoreReturnsUser_ReturnsUser() { var helper = new FakeUserHelper1(); var user = await helper.Retrieve <User>("*****@*****.**"); Assert.Equal(helper.FakeUserEmailStore.Retrieve_Output, user); }
public async Task WhenCalled_CallsUserEmailStore() { var helper = new FakeUserHelper1(); await helper.Retrieve <User>(email : "*****@*****.**"); Assert.True(helper.FakeUserEmailStore.Retrieve_Called); }
public async Task NullEmail_Throws() { UserHelper helper = new FakeUserHelper1(); await Assert.ThrowsAsync <ArgumentNullException>("email", async() => { await helper.Retrieve <User>(email: null); }); }
public async Task UserEmailStoreReturnsNull_ReturnsNull() { var helper = new FakeUserHelper1(); helper.FakeUserEmailStore.Retrieve_Output = null; var user = await helper.Retrieve <User>("*****@*****.**"); Assert.Null(user); }