/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static ProductDraftDsl of(final ProductDraft template) { return new ProductDraftDsl(template.getCategories(), template.getCategoryOrderHints(), template.getDescription(), template.getKey(), template.getMasterVariant(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getProductType(), template.isPublish(), template.getSearchKeywords(), template.getSlug(), template.getState(), template.getTaxCategory(), template.getVariants()); } }
assertThat(productDraft.getMetaDescription()).isEqualTo(metaDescription); assertThat(productDraft.getMetaKeywords()).isEqualTo(metaKeywords); assertThat(productDraft.getCategories()).isEqualTo(categories); assertThat(productDraft.getTaxCategory()).isEqualTo(taxCategory); assertThat(productDraft.getSearchKeywords()).isEqualTo(searchKeywords);
/** * Creates a new object initialized with the fields of the template parameter. * * @param template the template * @return a new object initialized from the template */ public static ProductDraftBuilder of(final ProductDraft template) { return new ProductDraftBuilder(template.getCategories(), template.getCategoryOrderHints(), template.getDescription(), template.getKey(), template.getMasterVariant(), template.getMetaDescription(), template.getMetaKeywords(), template.getMetaTitle(), template.getName(), template.getProductType(), template.isPublish(), template.getSearchKeywords(), template.getSlug(), template.getState(), template.getTaxCategory(), template.getVariants()); } }