Class NoSplittingStrategyTest


  • @UnitTest
    public class NoSplittingStrategyTest
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 of SourcingResult
      It checks if the source is completed.
      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 of SourcingResult
      It checks if the source is completed.
      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.
      void setUp()  
      void shouldFail_nullContext()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoSplittingStrategyTest

        public NoSplittingStrategyTest()
    • 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 of SourcingResult
        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 of SourcingResult
        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 of SourcingResult
        It checks if the source is completed.
      • shouldFail_nullContext

        public void shouldFail_nullContext()