Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

Dynamics Retail Discount Extensibility – Sample Test

Discussion in 'Official Microsoft News' started by Zhiyi Zhang, Apr 13, 2017.

Thread Status:
Not open for further replies.
  1. Zhiyi Zhang

    Zhiyi Zhang Guest

    Blog Posts:
    It is under private review. If you need it now, ping me or your Dynamics retail extensibility team contact.

    We build sample test (Runtime.Extensions.PricingEngineSample.Tests in sample SDK) on top on the Dynamics retail pricing engine test foundation.

    Mock your new discount type

    1. (Folder TestDataManager) Extends PeriodicDisocuntData and PeriodicDiscountLineData from test foundation. See ExtensionDiscountData and ExtensionDiscountLineData.
    2. (Folder TestDataManagerSampleData) Add xml file for your discount data. See DiscountOffersAmountCap.xml or DiscountOffersLineFilter.xml. If a price group is associated with a non-zero priority, add it to ExtensionPriceGroups.xml
    3. (Folder TestDataManager) PricingSampleRepository: read extension discount data from xml
    4. (Folder TestDataManager) GlobalTestSampleDataCache: your sample data global cache.
    5. (Folder TestDataManager) ExtensionTestPricingDataManager. You can override ReadRetailDiscounts and GetRetailDiscountPriceGroups. In addition, it needs to support your own extension data access interface.
    Now you can have fun with your new discount type and your tests.

    All tests need to inherit from PricingBaseFunctionalTests.

    Related: Dynamics Retail Discount Extensibility – Test Foundation

    Related: Dynamics Retail Discount Extensibility – Main picture

    Continue reading...
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software