Microsoft.AspNet.Identity.IUserClaimStore.GetClaimsAsync(RavenUser)

Here are the examples of the csharp api class Microsoft.AspNet.Identity.IUserClaimStore.GetClaimsAsync(RavenUser) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: AspNet.Identity.RavenDB
Source File: RavenUserClaimStoreFacts.cs
[Fact]
        public async Task GetUserClaims_Should_Not_Return_Null_If_User_Has_No_Claims()
        {
            string userName = "Tugberk";

            using (IDocumentStore store = CreateEmbeddableStore())
            using (IAsyncDocumentSession ses = store.OpenAsyncSession())
            {
                ses.Advanced.UseOptimisticConcurrency = true;
                IUserClaimStore<RavenUser> userClaimStore = new RavenUserStore<RavenUser>(ses, false);
                RavenUser user = new RavenUser(userName);

                await ses.StoreAsync(user);
                await ses.SaveChangesAsync();

                // Act
                IEnumerable<Claim> retrievedClaims = await userClaimStore.GetClaimsAsync(user);

                // Assert
                Assert.Equal(0, retrievedClaims.Count());
            }
        }

2. Example

Project: AspNet.Identity.RavenDB
Source File: RavenUserClaimStoreFacts.cs
[Fact]
        public async Task GetUserClaims_Should_Retrieve_Correct_Claims_For_User()
        {
 /n ..... /n //View Source file for more details /n }