public void CreateSelfLinkReturnsCorrectResult( AtomLink link) { AtomLink actual = AtomLink.CreateSelfLink(link.Href); var expected = link.WithRel("self"); Assert.Equal(expected, actual); }
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); }
public void ToViaLinkReturnsCorrectResult( AtomLink sut) { Assert.NotEqual("via", sut.Rel); AtomLink actual = sut.ToViaLink(); var expected = sut.WithRel("via"); Assert.Equal(expected, actual); }