예제 #1
0
 public void Test_GetFieldTypesReferencedByCondition_NullQueryCondition()
 {
     Assert.That(() => EntityAccessControlCheckerHelper.GetFieldTypesReferencedByCondition(new StructuredQuery {
         Conditions = null
     }),
                 Throws.TypeOf <ArgumentNullException>().And.Property("ParamName").EqualTo("structuredQuery"));
 }
예제 #2
0
 public void Test_GetFieldTypesReferencedByCondition(Func <StructuredQuery> structuredQueryFactory, string[] expectedResults)
 {
     Assert.That(EntityAccessControlCheckerHelper.GetFieldTypesReferencedByCondition(structuredQueryFactory()),
                 Is.EquivalentTo(expectedResults.Select(s => new EntityRef(s))).Using(EntityRefComparer.Instance));
 }