Esempio n. 1
0
        public void TryGetNonTemplatedLinkOnResource_WithValidResourceWithNullLinks_ExpectNoExceptionAndNull()
        {
            var resource = new TestResource();

            var actual = resource.TryGetLink(DefaultRel);

            actual.ShouldBeNull();
        }
Esempio n. 2
0
        public void TryGetTemplatedLinkOnResource_WithValidResourceWithNullLinksWithSingleTemplate_ExpectNoExceptionAndNull()
        {
            var resource = new TestResource();

            var actual = resource.TryGetLink(DefaultRel, DefaultToken1, DefaultToken1Value);

            actual.ShouldBeNull();
        }
Esempio n. 3
0
        public void TryGetNonTemplatedLinkOnResource_WithValidResourceWithEmptyLinks_ExpectNoExceptionAndNull()
        {
            var resource = new TestResource
            {
                Links = new HyperMediaLinks()
            };

            var actual = resource.TryGetLink(DefaultRel);

            actual.ShouldBeNull();
        }
Esempio n. 4
0
        public void TryGetTemplatedLinkOnResource_WithValidResourceWithNullLinksWithMultipleTemplate_ExpectNoExceptionAndNull()
        {
            var resource = new TestResource();

            var actual = resource.TryGetLink(DefaultRel, new Dictionary <string, object>
            {
                { DefaultToken1, DefaultToken1Value },
                { DefaultToken2, DefaultToken2Value }
            });

            actual.ShouldBeNull();
        }