private IEnumerable <TestCaseData> Test_GetReferencedRelationships_Source() { // Using a Func<StructuredQuery> rather than a straight StructuredQuery to // avoid issues with NUnit and using a CallContext in a TestCaseSource method. yield return(new TestCaseData((Func <StructuredQuery>)(() => TestQueries.Entities()), new string[0])); yield return(new TestCaseData((Func <StructuredQuery>)(() => TestQueries.AccessRulesWithNamedPermission("read")), new[] { "core:permissionAccess" })); // Get multiple relationships form the root entity, including an enum yield return(new TestCaseData((Func <StructuredQuery>)(() => TestQueries.ActiveUsersInRole("administrators")), new[] { "core:userHasRole", "core:accountStatus" })); // Test nested related resource nodes and reverse relationships yield return(new TestCaseData((Func <StructuredQuery>)(() => TestQueries.TypesSecuredBySubjects("administrators")), new[] { "core:allowAccess", "core:controlAccess" })); }