public static void IsMeta_Value(UriSegment elementAt)
            {
                var segment = elementAt.As <UriSegment.Meta>();

                segment.Should().NotBeNull();
                segment.item.IsValue.Should().BeTrue();
            }
            public static void IsEntityType(UriSegment seg, string Key, string Name, ResourceType resource)
            {
                var segment = seg.As <UriSegment.EntityType>();

                segment.Should().NotBeNull();
                segment.item.Key.Should().Be(Key);
                segment.item.Name.Should().Be(Name);
                segment.item.ResourceType.Should().Be(resource);
            }
            public static void IsPropertyCollection(UriSegment elementAt, string Name, ResourceType resource)
            {
                var segment = elementAt.As <UriSegment.PropertyAccessCollection>();

                segment.Should().NotBeNull();
                segment.item.Property.Name.Should().Be(Name);
                segment.item.ResourceType.Should().NotBeNull();
                segment.item.ResourceType.Should().Be(resource);
                segment.item.Key.Should().BeNull();
            }
            public static void IsPropertySingle(UriSegment elementAt, string name, string key = null)
            {
                var segment = elementAt.As <UriSegment.PropertyAccessSingle>();

                segment.Should().NotBeNull();
                segment.item.Property.Name.Should().Be(name);
                segment.item.ResourceType.Should().NotBeNull();
                if (key == null)
                {
                    segment.item.Key.Should().BeNull();
                }
                else
                {
                    segment.item.Key.Should().NotBeNull();
                    segment.item.Key.Should().Be(key);
                }
            }
 public static void IsPropertySingle(UriSegment elementAt, string name, string key = null)
 {
     var segment = elementAt.As<UriSegment.PropertyAccessSingle>();
     segment.Should().NotBeNull();
     segment.item.Property.Name.Should().Be(name);
     segment.item.ResourceType.Should().NotBeNull();
     if (key == null )
         segment.item.Key.Should().BeNull();
     else
     {
         segment.item.Key.Should().NotBeNull();
         segment.item.Key.Should().Be(key);
     }
 }
 public static void IsPropertyCollection(UriSegment elementAt, string Name, ResourceType resource)
 {
     var segment = elementAt.As<UriSegment.PropertyAccessCollection>();
     segment.Should().NotBeNull();
     segment.item.Property.Name.Should().Be(Name);
     segment.item.ResourceType.Should().NotBeNull();
     segment.item.ResourceType.Should().Be(resource);
     segment.item.Key.Should().BeNull();
 }
 public static void IsMeta_Value(UriSegment elementAt)
 {
     var segment = elementAt.As<UriSegment.Meta>();
     segment.Should().NotBeNull();
     segment.item.IsValue.Should().BeTrue();
 }
 public static void IsEntityType(UriSegment seg, string Key, string Name, ResourceType resource)
 {
     var segment = seg.As<UriSegment.EntityType>();
     segment.Should().NotBeNull();
     segment.item.Key.Should().Be(Key);
     segment.item.Name.Should().Be(Name);
     segment.item.ResourceType.Should().Be(resource);
 }