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