public async Task CheckGetByIdAsync(string id) { var areaFromDb = await areaProvider.GetByIdAsync(id); Assert.NotNull(areaFromDb); Assert.IsType <Area>(areaFromDb); }
public async Task CheckCreateRoleAsync(string areaId, string accountId, string possibleRoleId) { Role role = new Role(); Account account = await accountProvider.GetById(accountId); Area area = await areaProvider.GetByIdAsync(areaId); PossibleRole possibleRole = await possibleRoleProvider.GetByIdAsync(possibleRoleId); role.Account = account; role.DefaultRole = possibleRole; role.Context = area; var created = await roleProvider.CreateRoleAsync(role); Assert.NotNull(created); Assert.IsType <Role>(created); Assert.True(await roleProvider.RemoveRoleCreated(created.Id)); }