Abp.Zero.SampleApp.EntityFrameworkCore.Tests.EfCore_Tests.CreateRoleAsync(string)

Here are the examples of the csharp api class Abp.Zero.SampleApp.EntityFrameworkCore.Tests.EfCore_Tests.CreateRoleAsync(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

6 Examples 7

1. Example

Project: module-zero
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Should_Create_And_Retrieve_Role()
        {
            await CreateRoleAsync("Role1");

            var role1Retrieved = await _roleManager.FindByNameAsync("Role1");
            role1Retrieved.ShouldNotBe(null);
            role1Retrieved.Name.ShouldBe("Role1");
        }

2. Example

Project: module-zero
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Multi_Tenancy_Tests_Using_Session()
        {
            //Switch to host
            AbpSession.TenantId = null;

            UsingDbContext(context => { context.Roles.Count().ShouldBe(0); });

            await CreateRoleAsync("HostRole1");

            UsingDbContext(context => { context.Roles.Count().ShouldBe(1); });

            //Switch to tenant 1
            AbpSession.TenantId = 1;

            UsingDbContext(context => { context.Roles.Count().ShouldBe(0); });

            await CreateRoleAsync("TenantRole1");

            UsingDbContext(context => { context.Roles.Count().ShouldBe(1); });
        }

3. Example

Project: module-zero
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Multi_Tenancy_Tests_Using_UOW()
        {
            var uowManage/n ..... /n //View Source file for more details /n }

4. Example

Project: aspnetboilerplate
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Multi_Tenancy_Tests_Using_UOW()
        {
            var uowManage/n ..... /n //View Source file for more details /n }

5. Example

Project: aspnetboilerplate
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Should_Create_And_Retrieve_Role()
        {
            await CreateRoleAsync("Role1");

            var role1Retrieved = await _roleManager.FindByNameAsync("Role1");
            role1Retrieved.ShouldNotBe(null);
            role1Retrieved.Name.ShouldBe("Role1");
        }

6. Example

Project: aspnetboilerplate
Source File: EfCore_Tests.cs
View license
[Fact]
        public async Task Multi_Tenancy_Tests_Using_Session()
        {
            //Switch to host
            AbpSession.TenantId = null;

            UsingDbContext(context => { context.Roles.Count().ShouldBe(0); });

            await CreateRoleAsync("HostRole1");

            UsingDbContext(context => { context.Roles.Count().ShouldBe(1); });

            //Switch to tenant 1
            AbpSession.TenantId = 1;

            UsingDbContext(context => { context.Roles.Count().ShouldBe(0); });

            await CreateRoleAsync("TenantRole1");

            UsingDbContext(context => { context.Roles.Count().ShouldBe(1); });
        }