public void test_WHEN_no_field_ref_specified_THEN_expression_is_not_valid() { var xml = string.Format( "<Membership Type=\"CurrentUserGroups\">" + "</Membership>"); var analyzer = new ReMembershipAnalyzer(XmlHelper.Get(xml), null); Assert.IsFalse(analyzer.IsValid()); }
public void test_WHEN_no_membership_type_specified_THEN_expression_is_not_valid() { var xml = string.Format( "<Membership>" + "</Membership>"); var analyzer = new ReMembershipAnalyzer(XmlHelper.Get(xml), null); Assert.IsFalse(analyzer.IsValid()); }
public void test_WHEN_field_ref_and_membership_type_specified_THEN_expression_is_valid() { var xml = string.Format( "<Membership Type=\"CurrentUserGroups\">" + " <FieldRef Name=\"Field\" />" + "</Membership>"); var analyzer = new ReMembershipAnalyzer(XmlHelper.Get(xml), new ReOperandBuilderFromCaml()); Assert.IsTrue(analyzer.IsValid()); }
public void test_WHEN_expression_is_spgroup_and_id_not_specified_THEN_expression_is_not_valid() { var xml = string.Format( "<Membership Type=\"SPGroup\">" + " <FieldRef Name=\"Field\" />" + "</Membership>"); var analyzer = new ReMembershipAnalyzer(XmlHelper.Get(xml), null); Assert.IsFalse(analyzer.IsValid()); }
public void test_WHEN_xml_is_null_THEN_expression_is_not_valid() { var analyzer = new ReMembershipAnalyzer(null, null); Assert.IsFalse(analyzer.IsValid()); }