Exemplo n.º 1
0
                public async Task NullUser_Throws()
                {
                    UserHelper helper = new FakeUserHelper1();

                    await Assert.ThrowsAsync <ArgumentNullException>("user", async() =>
                    {
                        await helper.RefreshSecurityStamp <User>(user: null);
                    });
                }
Exemplo n.º 2
0
                public async Task ValidUser_SetsSecurityStamp20CharactersLong()
                {
                    UserHelper helper = new FakeUserHelper1();
                    var        user   = new User();

                    await helper.RefreshSecurityStamp(user);

                    Assert.NotNull(user.SecurityStamp);
                    Assert.Equal(20, user.SecurityStamp.Length);
                }