Ejemplo n.º 1
0
        public AndConstraint <JsonPropertyAssertion> AppearingAfterProperty(CamelCasedString previousProperty)
        {
            var assertions = _assertions.MatchRegex($"\"{previousProperty}\":.*\"{_property}\":").And;

            return(new AndConstraint <JsonPropertyAssertion>(new JsonPropertyAssertion(assertions, _property)));
        }
Ejemplo n.º 2
0
 public JsonPropertyAssertion(StringAssertions assertions, CamelCasedString property)
 {
     _assertions = assertions;
     _property   = property;
 }
Ejemplo n.º 3
0
        public AndConstraint <JsonPropertyAssertion> AppearingBeforeProperty(CamelCasedString nextProperty)
        {
            var assertions = _assertions.MatchRegex($"\"{_property}\":.*\"{nextProperty}\":").And;

            return(new AndConstraint <JsonPropertyAssertion>(new JsonPropertyAssertion(assertions, _property)));
        }
 public static JsonPropertyAssertion HaveProperty(this StringAssertions assertions, CamelCasedString property)
 {
     return(new JsonPropertyAssertion(assertions.MatchRegex($"\"{property}\":").And, property));
 }