コード例 #1
0
        public void TryParse(string pointerString, int parentSteps, string[] segments)
        {
            Assert.IsTrue(RelativeJsonPointer.TryParse(pointerString, out var pointer));

            pointer.ParentSteps.Should().Be((uint)parentSteps);
            pointer.Pointer.Segments.Length.Should().Be(segments.Length);
            pointer.Pointer.Segments.Select(s => s.Value).Should().BeEquivalentTo(segments);
        }
コード例 #2
0
 public void TryParseFailure(string pointerString)
 {
     Assert.False(RelativeJsonPointer.TryParse(pointerString, out _));
 }