public void Constructor_WithNamespace_SetsSelector() { const string expectedSelector = "//Test"; var selector = new XPathSelector(expectedSelector, null); Assert.AreEqual(expectedSelector, selector.Selector); }
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); }
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); }
public ContainsPredicate(T fields, bool isCaseSensitive, string exceptExpression, XPathSelector selector) : base(isCaseSensitive, exceptExpression, selector) { Fields = fields; }
public ContainsPredicate(T fields, bool isCaseSensitive = false, string exceptExpression = null, XPathSelector xpath = null, JsonPathSelector jsonpath = null) : base(isCaseSensitive, exceptExpression, xpath, jsonpath) { Fields = fields; }
public PredicateBase(bool isCaseSensitive, string exceptExpression, XPathSelector selector) { IsCaseSensitive = isCaseSensitive; ExceptExpression = exceptExpression; Selector = selector; }