Example #1
0
        public async Task Adding_user_claims_should_work()
        {
            var(_, userCreated) = await usersService.CreateUser(TestUser).UnpackSingleOrDefault();

            var claimsToAdd = new Claim[] {
                new Claim("testclaim2", "testvalue"),
                new Claim("testclaim3", "testvalue")
            };

            var resultAdding1 = await usersService.AddClaimAsync(userCreated.Id, new Claim("testclaim1", "testvalue"));

            var resultAdding2 = await usersService.AddClaimsAsync(userCreated.Id, claimsToAdd);

            Assert.True(resultAdding1.Success);
            Assert.True(resultAdding2.Success);
        }