Exemplo n.º 1
0
        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>();
            }
        }
Exemplo n.º 2
0
 public void RunParsingTests(ParsingTestCase test)
 {
     RunTestCase(test, JsonPointerRepresentation.Normal);
 }
Exemplo n.º 3
0
 public void RunJsonStringParsingTests(ParsingTestCase test)
 {
     RunTestCase(test, JsonPointerRepresentation.JsonString);
 }
Exemplo n.º 4
0
 public void RunUriFragmentParsingTests(ParsingTestCase test)
 {
     RunTestCase(test, JsonPointerRepresentation.UriFragment);
 }