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; }
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)); }
public void SetCorrectNumberOfPages_Should_BeSet(int numberOfPages) { BookPagesValue bookPagesValue = new BookPagesValue(numberOfPages: numberOfPages); Assert.Equal(numberOfPages, bookPagesValue.NumberOfPages); }