public void Constructor_SetsXpathSelector()
        {
            var expectedXPathSelector = new XPathSelector("!$");

            var fields = new TestPredicateFields();
            var predicate = new DeepEqualsPredicate<TestPredicateFields>(fields, false, null, expectedXPathSelector);
            Assert.AreEqual(expectedXPathSelector, predicate.Selector);
        }
        public void Constructor_SetsExceptExpression()
        {
            const string expectedExceptRegex = "!$";

            var fields = new TestPredicateFields();
            var predicate = new DeepEqualsPredicate<TestPredicateFields>(fields, false, expectedExceptRegex, null);
            Assert.AreEqual(expectedExceptRegex, predicate.ExceptExpression);
        }
        public void Constructor_SetsExceptExpression()
        {
            const string expectedExceptRegex = "!$";

            var fields    = new TestPredicateFields();
            var predicate = new DeepEqualsPredicate <TestPredicateFields>(fields, false, expectedExceptRegex, null);

            Assert.AreEqual(expectedExceptRegex, predicate.ExceptExpression);
        }
예제 #4
0
        public void DeepEqualsPredicate_Constructor_SetsJsonPathSelector()
        {
            var expectedJsonPathSelector = new JsonPathSelector("$..title");

            var fields    = new TestPredicateFields();
            var predicate = new DeepEqualsPredicate <TestPredicateFields>(fields, jsonpath: expectedJsonPathSelector);

            Assert.AreEqual(expectedJsonPathSelector, predicate.JsonPathSelector);
        }
예제 #5
0
        public void Constructor_SetsXpathSelector()
        {
            var expectedXPathSelector = new XPathSelector("!$");

            var fields    = new TestPredicateFields();
            var predicate = new DeepEqualsPredicate <TestPredicateFields>(fields, xpath: expectedXPathSelector);

            Assert.AreEqual(expectedXPathSelector, predicate.XPathSelector);
        }
 public void Constructor_SetsFieldObject()
 {
     var expectedFields = new TestPredicateFields();
     var predicate = new DeepEqualsPredicate<TestPredicateFields>(expectedFields);
     Assert.AreSame(expectedFields, predicate.Fields);
 }
 public void Constructor_SetsCaseSensitivity()
 {
     var fields = new TestPredicateFields();
     var predicate = new DeepEqualsPredicate<TestPredicateFields>(fields, true, null, null);
     Assert.IsTrue(predicate.IsCaseSensitive);
 }