| Constructor and Description |
|---|
NoRestrictionsStrategyTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertEqualQuantity(SourcingContext context,
long qtyExpected,
ProductModel product,
String posName) |
protected void |
assertEqualsQuantityAllocation(Set<SourcingResult> results,
String pos,
int qtyExpected) |
void |
setup() |
void |
shouldFail_nullContext() |
void |
testNothingSourced()
Given an order with 2 entries:
entry 1 : {quantity: 10, product: PROPANE_BARBECUE} entry 2 : {quantity: 20, product: CHARCOAL_BARBECUE} Result: It should not source. |
void |
testPartiallySourced()
Given an order with 2 entries:
entry 1 : {quantity: 10, product: PROPANE_BARBECUE} entry 2 : {quantity: 20, product: CHARCOAL_BARBECUE} Result: It should not source - not enough stock for PROPANE_BARBECUE SourcingResult {Warehouse: RECIFE, Availability : {[PROPANE_BARBECUE,5]} {Warehouse: OLINDA, Availability : {[CHARCOAL_BARBECUE,20]} Assert: It verifies the number of SourcingResultIt verifies the PointOfServiceModel where the order entries were sourcedIt checks if the source is completed. |
void |
testSourceCompleteFrom3Locations()
Given an order with 2 entries:
entry 1 : {quantity: 10, product: PROPANE_BARBECUE} entry 2 : {quantity: 20, product: CHARCOAL_BARBECUE} Result: It should source PROPANE_BARBECUE from 3 locations {Warehouse: RECIFE, Availability : {[PROPANE_BARBECUE,5], [CHARCOAL_BARBECUE,20}} {Warehouse: OLINDA, Availability : {[PROPANE_BARBECUE,3]} {Warehouse: PAULISTA, Availability : {[PROPANE_BARBECUE,2]} Assert: It verifies the number of SourcingResultIt verifies the PointOfServiceModel where the order entries were sourcedIt checks if the source is completed. |
void |
testSourcingNoRestriction1Location()
Given an order with 2 entries:
entry 1 : {quantity: 10, product: PROPANE_BARBECUE} entry 2 : {quantity: 20, product: CHARCOAL_BARBECUE} Result: It should source complete from 1 location {Warehouse: RECIFE, Availability : {[PROPANE_BARBECUE,10], [CHARCOAL_BARBECUE,20}} Assert: It verifies the number of SourcingResultIt verifies the PointOfServiceModel where the order entries were sourcedIt checks if the source is completed. |
void |
testSourcingNoRestrictionSplit2Location()
Given an order with 2 entries:
entry 1 : {quantity: 10, product: PROPANE_BARBECUE} entry 2 : {quantity: 20, product: CHARCOAL_BARBECUE} Result: It should source PROPANE_BARBECUE from 2 locations {Warehouse: RECIFE, Availability : {[PROPANE_BARBECUE,5], [CHARCOAL_BARBECUE,20}} {Warehouse: OLINDA, Availability : {[PROPANE_BARBECUE,5]} Assert: It verifies the number of SourcingResultIt verifies the PointOfServiceModel where the order entries were sourcedIt checks if the source is completed. |
public void setup()
public void testSourcingNoRestriction1Location()
SourcingResultPointOfServiceModel where the order entries were sourcedpublic void testSourcingNoRestrictionSplit2Location()
SourcingResultPointOfServiceModel where the order entries were sourcedpublic void testSourceCompleteFrom3Locations()
SourcingResultPointOfServiceModel where the order entries were sourcedpublic void testNothingSourced()
SourcingResultPointOfServiceModel where the order entries were sourcedpublic void testPartiallySourced()
SourcingResultPointOfServiceModel where the order entries were sourcedpublic void shouldFail_nullContext()
protected void assertEqualQuantity(SourcingContext context, long qtyExpected, ProductModel product, String posName)
protected void assertEqualsQuantityAllocation(Set<SourcingResult> results, String pos, int qtyExpected)
Copyright © 2017 SAP SE. All Rights Reserved.