void SegmentTemplate() { var path = LinkPath.From("{x}"); Expect(path.IsTemplate); Expect(path.Segments[0].IsTemplate); }
// // Segment // void Segment() { var path = LinkPath.From("x"); Expect(path.ToString()).Is("x"); Expect(path.Segments.Count).Is(1); Expect(path.Segments[0].ToString()).Is("x"); }
// // Segments // void Segments() { var path = LinkPath.From("x", "y"); Expect(path.ToString()).Is("x/y"); Expect(path.Segments.Count).Is(2); Expect(path.Segments[0].ToString()).Is("x"); Expect(path.Segments[1].ToString()).Is("y"); }
void SegmentLeadingTrailing() { var path = LinkPath.From("x").ToText(leading: true, trailing: true); Expect(path.ToString()).Is("/x/"); }
void SegmentTrailing() { var path = LinkPath.From("x").ToText(trailing: true); Expect(path.ToString()).Is("x/"); }
void SegmentSeparator() { var path = LinkPath.From("x").ToText(separator: "."); Expect(path.ToString()).Is("x"); }
void SegmentsLeading() { var path = LinkPath.From("x", "y").ToText(leading: true); Expect(path.ToString()).Is("/x/y"); }