public async Task CanCreateUsingAddRoleManager() { var manager = TestIdentityFactory.CreateRoleManager(); Assert.NotNull(manager); IdentityResultAssert.IsSuccess(await manager.CreateAsync(new IdentityRole("arole"))); }
public async Task CanSetUserName() { var manager = TestIdentityFactory.CreateRoleManager(); var role = new IdentityRole("UpdateRoleName"); IdentityResultAssert.IsSuccess(await manager.CreateAsync(role)); Assert.Null(await manager.FindByNameAsync("New")); IdentityResultAssert.IsSuccess(await manager.SetRoleNameAsync(role, "New")); Assert.NotNull(await manager.FindByNameAsync("New")); Assert.Null(await manager.FindByNameAsync("UpdateAsync")); }