Esempio n. 1
0
 public void Test_GetReferencedRelationshipTypes_NullRootEntity()
 {
     Assert.That(() => EntityAccessControlCheckerHelper.GetReferencedRelationshipTypes(new StructuredQuery {
         RootEntity = null
     }),
                 Throws.TypeOf <ArgumentNullException>().And.Property("ParamName").EqualTo("structuredQuery"));
 }
Esempio n. 2
0
 public void Test_GetReferencedRelationshipTypes(Func <StructuredQuery> structuredQueryFactory, string[] expectedResults)
 {
     Assert.That(EntityAccessControlCheckerHelper.GetReferencedRelationshipTypes(structuredQueryFactory()),
                 Is.EquivalentTo(expectedResults.Select(s => new EntityRef(s))).Using(EntityRefComparer.Instance));
 }