public void WithUpdatedReturnsCorrectResult( AtomFeed sut, DateTimeOffset newUpdated) { AtomFeed actual = sut.WithUpdated(newUpdated); var expected = sut.AsSource().OfLikeness <AtomFeed>() .With(x => x.Updated).EqualsWhen( (s, d) => object.Equals(newUpdated, d.Updated)); expected.ShouldEqual(actual); }
public void WithTitleReturnsCorrectResult( AtomFeed sut, string newTitle) { AtomFeed actual = sut.WithTitle(newTitle); var expected = sut.AsSource().OfLikeness <AtomFeed>() .With(x => x.Title).EqualsWhen( (s, d) => object.Equals(newTitle, d.Title)); expected.ShouldEqual(actual); }
public void WithLinksReturnsCorrectResult( AtomFeed sut, IEnumerable <AtomLink> newLinks) { AtomFeed actual = sut.WithLinks(newLinks); var expected = sut.AsSource().OfLikeness <AtomFeed>() .With(x => x.Links).EqualsWhen( (s, d) => newLinks.SequenceEqual(d.Links)); expected.ShouldEqual(actual); }
public void AddLinkReturnsCorrectResult( AtomFeed sut, AtomLink newLink) { AtomFeed actual = sut.AddLink(newLink); var expected = sut.AsSource().OfLikeness <AtomFeed>() .With(x => x.Links).EqualsWhen( (s, d) => sut.Links.Concat(new[] { newLink }).SequenceEqual(d.Links)); expected.ShouldEqual(actual); }
public void WithAuthorReturnsCorrectResult( AtomFeed sut, AtomAuthor newAuthor) { AtomFeed actual = sut.WithAuthor(newAuthor); var expected = sut.AsSource().OfLikeness <AtomFeed>() .With(x => x.Author).EqualsWhen( (s, d) => object.Equals(newAuthor, d.Author)); expected.ShouldEqual(actual); }