public async Task <ActionResult> RoleDelete(int id) { if (id < 0) { return(BadRequest()); } await dictionaryStorage.RoleDelete(id); return(Ok()); }
private async Task RoleTestDelete(List <Role> listRole) { foreach (Role listRole1 in listRole) { List <Role> list = dictionaryStorage.RoleGetAll().Result; await dictionaryStorage.RoleDelete((int)listRole1.Id); List <Role> list1 = dictionaryStorage.RoleGetAll().Result; Assert.AreEqual(list.Count - 1, list1.Count); Assert.False(list1.Contains(listRole1)); } }