예제 #1
0
        public void CreateSelfLinkReturnsCorrectResult(
            AtomLink link)
        {
            AtomLink actual = AtomLink.CreateSelfLink(link.Href);

            var expected = link.WithRel("self");
            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void WithRelReturnsCorrectResult(
            AtomLink sut,
            string newRel)
        {
            AtomLink actual = sut.WithRel(newRel);

            var expected = sut.AsSource().OfLikeness<AtomLink>()
                .With(x => x.Rel).EqualsWhen(
                    (s, d) => object.Equals(newRel, d.Rel));
            expected.ShouldEqual(actual);
        }
예제 #3
0
        public void ToViaLinkReturnsCorrectResult(
            AtomLink sut)
        {
            Assert.NotEqual("via", sut.Rel);

            AtomLink actual = sut.ToViaLink();

            var expected = sut.WithRel("via");
            Assert.Equal(expected, actual);
        }