public void AddLinkReturnsCorrectResult(
            AtomEntry sut,
            AtomLink newLink)
        {
            AtomEntry actual = sut.AddLink(newLink);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Links).EqualsWhen(
                    (s, d) => sut.Links.Concat(new[] { newLink }).SequenceEqual(d.Links));
            expected.ShouldEqual(actual);
        }
Example #2
0
        public void WithTitleReturnsCorrectResult(
            AtomEntry sut,
            string newTitle)
        {
            AtomEntry actual = sut.WithTitle(newTitle);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Title).EqualsWhen(
                (s, d) => object.Equals(newTitle, d.Title));

            expected.ShouldEqual(actual);
        }
Example #3
0
        public void AddLinkReturnsCorrectResult(
            AtomEntry sut,
            AtomLink newLink)
        {
            AtomEntry actual = sut.AddLink(newLink);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Links).EqualsWhen(
                (s, d) => sut.Links.Concat(new[] { newLink }).SequenceEqual(d.Links));

            expected.ShouldEqual(actual);
        }
Example #4
0
        public void WithLinksReturnsCorrectResult(
            AtomEntry sut,
            IEnumerable <AtomLink> newLinks)
        {
            AtomEntry actual = sut.WithLinks(newLinks);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Links).EqualsWhen(
                (s, d) => newLinks.SequenceEqual(d.Links));

            expected.ShouldEqual(actual);
        }
Example #5
0
        public void WithContentReturnsCorrectResult(
            AtomEntry sut,
            XmlAtomContent newContent)
        {
            AtomEntry actual = sut.WithContent(newContent);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Content).EqualsWhen(
                (s, d) => object.Equals(newContent, d.Content));

            expected.ShouldEqual(actual);
        }
Example #6
0
        public void WithAuthorReturnsCorrectResult(
            AtomEntry sut,
            AtomAuthor newAuthor)
        {
            AtomEntry actual = sut.WithAuthor(newAuthor);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Author).EqualsWhen(
                (s, d) => object.Equals(newAuthor, d.Author));

            expected.ShouldEqual(actual);
        }
Example #7
0
        public void WithUpdatedReturnsCorrectResult(
            AtomEntry sut,
            DateTimeOffset newUpdated)
        {
            AtomEntry actual = sut.WithUpdated(newUpdated);

            var expected = sut.AsSource().OfLikeness <AtomEntry>()
                           .With(x => x.Updated).EqualsWhen(
                (s, d) => object.Equals(newUpdated, d.Updated));

            expected.ShouldEqual(actual);
        }
        public void WithUpdatedReturnsCorrectResult(
            AtomEntry sut,
            DateTimeOffset newUpdated)
        {
            AtomEntry actual = sut.WithUpdated(newUpdated);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Updated).EqualsWhen(
                    (s, d) => object.Equals(newUpdated, d.Updated));
            expected.ShouldEqual(actual);
        }
        public void WithTitleReturnsCorrectResult(
            AtomEntry sut,
            string newTitle)
        {
            AtomEntry actual = sut.WithTitle(newTitle);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Title).EqualsWhen(
                    (s, d) => object.Equals(newTitle, d.Title));
            expected.ShouldEqual(actual);
        }
        public void WithLinksReturnsCorrectResult(
            AtomEntry sut,
            IEnumerable<AtomLink> newLinks)
        {
            AtomEntry actual = sut.WithLinks(newLinks);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Links).EqualsWhen(
                    (s, d) => newLinks.SequenceEqual(d.Links));
            expected.ShouldEqual(actual);
        }
        public void WithContentReturnsCorrectResult(
            AtomEntry sut,
            XmlAtomContent newContent)
        {
            AtomEntry actual = sut.WithContent(newContent);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Content).EqualsWhen(
                    (s, d) => object.Equals(newContent, d.Content));
            expected.ShouldEqual(actual);
        }
        public void WithAuthorReturnsCorrectResult(
            AtomEntry sut,
            AtomAuthor newAuthor)
        {
            AtomEntry actual = sut.WithAuthor(newAuthor);

            var expected = sut.AsSource().OfLikeness<AtomEntry>()
                .With(x => x.Author).EqualsWhen(
                    (s, d) => object.Equals(newAuthor, d.Author));
            expected.ShouldEqual(actual);
        }