public void ThenThereAreFollowingRoles(Table table) { var roles = IdentityManagementService.GetRoles().ToList(); Assert.AreEqual(table.Rows.Count, roles.Count()); foreach (var row in table.Rows) { var name = row["Name"]; var description = row["Description"]; var externalGroupName = row["External group"]; Assert.IsNotNull( roles.SingleOrDefault(o => o.Name == name && Equals(o.Description, description) && Equals(o.ExternalGroupName, externalGroupName)), row.ToTableString()); } }