public void CanANewRoleBeCreated() { Role a = new Role() { roleid = 99, title = "some text that came from testing", permissions = new List <RolePermissions>(), }; a.permissions.Add(new RolePermissions() { keyid = "Some Role Name", value = "Some value to the role name" } ); a.permissions.Add(new RolePermissions() { keyid = "Some other Role Name", value = "Some other value to the role name" } ); _testRepo.Add(a); var insertedRole = _testRepo.FindAll().Where(w => w.title == a.title).First(); _testid = insertedRole.roleid; Assert.AreEqual(a.title, insertedRole.title); }
public IActionResult GetRole() { _log.LogInformation(RoleRepo.getConnectionString()); return(Ok(RoleRepo.FindAll())); }