public AndConstraint <JsonPropertyAssertion> AppearingAfterProperty(CamelCasedString previousProperty) { var assertions = _assertions.MatchRegex($"\"{previousProperty}\":.*\"{_property}\":").And; return(new AndConstraint <JsonPropertyAssertion>(new JsonPropertyAssertion(assertions, _property))); }
public JsonPropertyAssertion(StringAssertions assertions, CamelCasedString property) { _assertions = assertions; _property = property; }
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)); }