Пример #1
0
                public async Task UserEmailStoreReturnsUser_ReturnsUser()
                {
                    var helper = new FakeUserHelper1();

                    var user = await helper.Retrieve <User>("*****@*****.**");

                    Assert.Equal(helper.FakeUserEmailStore.Retrieve_Output, user);
                }
Пример #2
0
                public async Task WhenCalled_CallsUserEmailStore()
                {
                    var helper = new FakeUserHelper1();

                    await helper.Retrieve <User>(email : "*****@*****.**");

                    Assert.True(helper.FakeUserEmailStore.Retrieve_Called);
                }
Пример #3
0
                public async Task NullEmail_Throws()
                {
                    UserHelper helper = new FakeUserHelper1();

                    await Assert.ThrowsAsync <ArgumentNullException>("email", async() =>
                    {
                        await helper.Retrieve <User>(email: null);
                    });
                }
Пример #4
0
                public async Task UserEmailStoreReturnsNull_ReturnsNull()
                {
                    var helper = new FakeUserHelper1();

                    helper.FakeUserEmailStore.Retrieve_Output = null;

                    var user = await helper.Retrieve <User>("*****@*****.**");

                    Assert.Null(user);
                }