private void RunTestCase(ParsingTestCase test, JsonPointerRepresentation format) { JsonPointer jPointer = null; Action action = () => jPointer = new JsonPointer(test.Value, format); if (test.Valid) { action.Should().NotThrow(); jPointer.ReferenceTokens.Should().ContainInOrder(test.ReferenceTokens); jPointer.ReferenceTokens.Length.Should().Be(test.ReferenceTokens.Length); } else { action.Should().Throw <ArgumentException>(); } }
public void RunParsingTests(ParsingTestCase test) { RunTestCase(test, JsonPointerRepresentation.Normal); }
public void RunJsonStringParsingTests(ParsingTestCase test) { RunTestCase(test, JsonPointerRepresentation.JsonString); }
public void RunUriFragmentParsingTests(ParsingTestCase test) { RunTestCase(test, JsonPointerRepresentation.UriFragment); }