Class NoSplittingStrategyTest
- java.lang.Object
-
- de.hybris.platform.warehousing.sourcing.strategy.impl.NoSplittingStrategyTest
-
@UnitTest public class NoSplittingStrategyTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NoSplittingStrategyTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnoSplittingSourceFirstLocation()Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should complete using the first location (Montreal)
{Warehouse: Montreal, Availability : {[cheese,4], [milk,3]}
{Warehouse: Brossard, Availability : {[cheese,4], [milk,3]}
Assert:
It verifies the number ofSourcingResult
It checks if the source is completed.voidnoSplittingSourceSecondLocation()Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should complete using the second location(Brossard)
{Warehouse: Montreal, Availability : {[cheese,0], [milk,0]}
{Warehouse: Brossard, Availability : {[cheese,5], [milk,5]}
Assert:
It verifies the number ofSourcingResult
It checks if the source is completed.voidnoSplittingSourcingNoStock()Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should not complete.voidsetUp()voidshouldFail_nullContext()
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
noSplittingSourcingNoStock
public void noSplittingSourcingNoStock()
Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should not complete. There is no stock in the locations
{Warehouse: Montreal, Availability : {[cheese,0], [milk,0]}
{Warehouse: Brossard, Availability : {[cheese,0], [milk,0]}
Assert:
It verifies the number ofSourcingResult
It checks if the source is completed.
-
noSplittingSourceFirstLocation
public void noSplittingSourceFirstLocation()
Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should complete using the first location (Montreal)
{Warehouse: Montreal, Availability : {[cheese,4], [milk,3]}
{Warehouse: Brossard, Availability : {[cheese,4], [milk,3]}
Assert:
It verifies the number ofSourcingResult
It checks if the source is completed.
-
noSplittingSourceSecondLocation
public void noSplittingSourceSecondLocation()
Given an order with 2 entries:
entry 1 : {quantity: 3, product: cheese}
entry 2 : {quantity: 4, product: milk}
Result:
the source should complete using the second location(Brossard)
{Warehouse: Montreal, Availability : {[cheese,0], [milk,0]}
{Warehouse: Brossard, Availability : {[cheese,5], [milk,5]}
Assert:
It verifies the number ofSourcingResult
It checks if the source is completed.
-
shouldFail_nullContext
public void shouldFail_nullContext()
-
-