assertEquals("My Product", newProduct.name());
assertEquals("The description of My Product.", newProduct.description());
}
public void testNewProductWithDiscussion() throws Exception {
ProductOwner productOwner = this.persistedProductOwnerForTest();
String newProductId =
this.productApplicationService.newProductWithDiscussion(
new NewProductCommand(
"T-12345",
productOwner.productOwnerId().id(),
"My Product",
"The description of My Product."));
Product newProduct =
this.productRepository
.productOfId(
productOwner.tenantId(),
new ProductId(newProductId));
assertNotNull(newProduct);
assertEquals("My Product", newProduct.name());
assertEquals("The description of My Product.", newProduct.description());