Пример #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;
 }
Пример #4
0
        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;
 }