示例#1
0
        public void Constructor_WithNamespace_SetsSelector()
        {
            const string expectedSelector = "//Test";

            var selector = new XPathSelector(expectedSelector, null);
            Assert.AreEqual(expectedSelector, selector.Selector);
        }
示例#2
0
        public void Constructor_WithNamespace_SetsNamespaceDictionary()
        {
            var namespaces = new Dictionary<string, string> {{"isbn", "http://xmlnamespaces.org/isbn"}};

            var selector = new XPathSelector("//isbn:book", namespaces);
            Assert.AreEqual(namespaces, selector.Namespaces);
        }
示例#3
0
 public PredicateBase(bool isCaseSensitive, string exceptExpression, XPathSelector xpath, JsonPathSelector jsonpath)
 {
     IsCaseSensitive  = isCaseSensitive;
     ExceptExpression = exceptExpression;
     XPathSelector    = xpath;
     JsonPathSelector = jsonpath;
 }
        public void Constructor_SetsXpathSelector()
        {
            var expectedXPathSelector = new XPathSelector("!$");

            var fields = new TestPredicateFields();
            var predicate = new EqualsPredicate<TestPredicateFields>(fields, false, null, expectedXPathSelector);
            Assert.AreEqual(expectedXPathSelector, predicate.Selector);
        }
示例#5
0
 public ContainsPredicate(T fields, bool isCaseSensitive, string exceptExpression, XPathSelector selector)
     : base(isCaseSensitive, exceptExpression, selector)
 {
     Fields = fields;
 }
示例#6
0
 public ContainsPredicate(T fields, bool isCaseSensitive = false, string exceptExpression  = null,
                          XPathSelector xpath            = null, JsonPathSelector jsonpath = null)
     : base(isCaseSensitive, exceptExpression, xpath, jsonpath)
 {
     Fields = fields;
 }
示例#7
0
 public PredicateBase(bool isCaseSensitive, string exceptExpression, XPathSelector selector)
 {
     IsCaseSensitive  = isCaseSensitive;
     ExceptExpression = exceptExpression;
     Selector         = selector;
 }
示例#8
0
 public PredicateBase(bool isCaseSensitive, string exceptExpression, XPathSelector selector)
 {
     IsCaseSensitive = isCaseSensitive;
     ExceptExpression = exceptExpression;
     Selector = selector;
 }