Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creating a new discount type is a complex task as we really need to understand how discount works functionally. Assuming we have just created a new discount type, how do we test it out? We can always deploy it to Dynamics Lifecycle Services sandbox and test it out there. I have tried it myself a few times. It is a great experience for me, but it would be beyond time-consuming for daily development.
It is under private review. If you need it now, ping me or your Dynamics retail extensibility team contact.
In short, you can run component level unit test in your SDK.
- Mock pricing data accessor with XML. If you remember, we have IPricingDataAccessor to bridge the difference between AX and channel data access.
- Automatic validation of data integrity.
- Miscellaneous utilities.
It is more of a reference below. You may skip to sample test post.
It inherits from pricing engine data accessor: IPricingDataAccessor. In addition, it helps with test data setup
- Test configurations: concurrency control model, compound behavior, and hold-or-split-for-rounding, etc.
- AddPriceGroupToTransaction and AddPriceGroupsToTransaction: this sets up the (mock) discounts for the discount calculation.
TestFoundationPricingDataManager
SalesTransactionVerification
PeriodicDisocuntData and PeriodicDiscountLineData. You need to know them if you want to extend them to support your new discount types.
TestFoundationCommonData
TestFoundationPriceContextHelper
TestFoundationPricingHelper
TestFoundationSalesTransactionHelper
Under RetailSdk\Documents\SampleExtensionsInstructions\PricingAndDiscounts\TestFoundationData
Related: Dynamics Retail Discount Extensibility - Main picture
Related: Dynamics Retail Discount Extensibility - Sample Test