예제 #1
0
 private Book(Guid id, int?idInDb, BookName bookName, Author author, DateTimeOffset publishedDate, BookPagesValue pages) : base(id: id)
 {
     this.IdInDb        = idInDb;
     this.BookName      = bookName;
     this.Author        = author;
     this.PublishedDate = publishedDate;
     this.Pages         = pages;
 }
예제 #2
0
 public static Book Create(int?idInDb, BookName bookName, Author author, DateTimeOffset publishedDate, BookPagesValue pages)
 {
     return(new Book(
                id: Guid.NewGuid(),
                idInDb: idInDb,
                bookName: bookName,
                author: author,
                publishedDate: publishedDate,
                pages: pages));
 }
예제 #3
0
        public void SetCorrectNumberOfPages_Should_BeSet(int numberOfPages)
        {
            BookPagesValue bookPagesValue = new BookPagesValue(numberOfPages: numberOfPages);

            Assert.Equal(numberOfPages, bookPagesValue.NumberOfPages);
        }