-
Notifications
You must be signed in to change notification settings - Fork 19
DEVX-640-helper-method-from-Coco-product-to-import-API-product #1000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEVX-640-helper-method-from-Coco-product-to-import-API-product #1000
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1000 +/- ##
==========================================
+ Coverage 9.51% 9.66% +0.14%
- Complexity 2016 2059 +43
==========================================
Files 7717 7719 +2
Lines 75665 75932 +267
Branches 302 347 +45
==========================================
+ Hits 7202 7341 +139
- Misses 68286 68402 +116
- Partials 177 189 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product
…import-API-product
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product
| public final class ProductUtil { | ||
| private static KeyResolverService keyResolverService = new ExpandObjResolverService(); | ||
|
|
||
| public static ProductDraftImport toProductDraftImport(ProductProjection product) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public final class ProductUtil { | |
| private static KeyResolverService keyResolverService = new ExpandObjResolverService(); | |
| public static ProductDraftImport toProductDraftImport(ProductProjection product) { | |
| public class ProductUtil { | |
| private final KeyResolverService keyResolverService; | |
| public ProductUtil() { | |
| keyResolverService = new ExpandObjResolverService(); | |
| } | |
| public ProductUtil(final KeyResolverService resolverService) { | |
| keyResolverService = resolverService; | |
| } | |
| public ProductDraftImport toProductDraftImport(ProductProjection product) { |
It should be possible to inject the resolver service. You will have to rewrite some method signatures and remove the static keyword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product # Conflicts: # commercetools/commercetools-importapi-utils/src/main/java/com/commercetools/sdk/ProductUtil.java
jenschude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
https://commercetools.atlassian.net/jira/software/c/projects/DEVX/boards/1507?selectedIssue=DEVX-640
Added the Util class and test