Beispiel #1
0
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Assert Methods
        public static void Equal(IHypermediaPath expected, IHypermediaPath actual)
        {
            if (expected == null)
            {
                Assert.Null(actual);
                return;
            }
            Assert.NotNull(actual);

            Assert.Equal(expected.PathSegments, actual.PathSegments);
            Assert.Equal(expected.HypermediaPathType, actual.HypermediaPathType);
        }
Beispiel #2
0
        public static bool IsResourceCollectionPath(this IHypermediaPath hypermediaPath)
        {
            Contract.Requires(hypermediaPath != null);

            return(hypermediaPath.HypermediaPathType == HypermediaPathType.ResourceCollectionPath);
        }
Beispiel #3
0
        public static bool IsToManyResourcePath(this IHypermediaPath hypermediaPath)
        {
            Contract.Requires(hypermediaPath != null);

            return(hypermediaPath.HypermediaPathType == HypermediaPathType.ToManyResourcePath);
        }
Beispiel #4
0
        public static bool HasClrResourceType(this IHypermediaPath hypermediaPath)
        {
            Contract.Requires(hypermediaPath != null);

            return(hypermediaPath.HypermediaPathType != HypermediaPathType.NonResourcePath);
        }