public async Task NullIdentity_Throws()
                {
                    FakeIdentityService identity = null;

                    await Assert.ThrowsAsync <ArgumentNullException>("identity", async() =>
                    {
                        await identity.Retrieve(email: "*****@*****.**");
                    });
                }
                public async Task NullIdentity_Throws()
                {
                    FakeIdentityService identity = null;

                    await Assert.ThrowsAsync <ArgumentNullException>("identity", async() =>
                    {
                        await identity.ForgotPassword(user: User());
                    });
                }
Пример #3
0
        public void Throws_IdentityNotFound()
        {
            FakeIdentityService identityService = _identityServiceFactory.Create();

            identityService.ShouldFailNextCall = true;

            var command = GetCommand(It.IsAny <string>());
            var handler = GetHandler(_context, identityService);

            Assert.ThrowsAsync <ApplicationException>(async() => await handler.Handle(command, new CancellationToken()));
        }
                public async Task NullIdentity_Throws()
                {
                    FakeIdentityService identity = null;

                    await Assert.ThrowsAsync <ArgumentNullException>("identity", async() =>
                    {
                        await identity.ConfirmEmail(
                            user: User(),
                            code: 1234);
                    });
                }
                public async Task NullIdentity_Throws()
                {
                    FakeIdentityService identity = null;

                    await Assert.ThrowsAsync <ArgumentNullException>("identity", async() =>
                    {
                        await identity.UpdatePassword(
                            user: User(),
                            code: 1234,
                            password: "******");
                    });
                }