Main > Reference Manual > Unit tests > TestForecast1

The first step in the forecast netting process is associating each actual order with a forecast it can net from.
This test case test this matching algorithm.

A customer hierarchy is modeled as follows: "grandparent customer" > "parent customer" > "customer".
An item hierarchy is modeled as follows: "grandparent item" > "parent item" > "item".
Forecasts are defined at various combinations of these levels.
Actual orders are then looking for a matching forecast in these hierarchies.

Different scenarios are being validated:

  • A: an order matches a forecast at 'customer'+'item' level
  • B: an order matches a forecast at 'item' level
  • C: an order matches a forecast at 'parent customer' + 'item' level
  • D: an order matches a forecast at 'customer' + 'parent item' level
  • E: an order matches a forecast at 'parent customer' + 'parent item' level