Morning Nick,
GetShipment actually returns a ShipmentList which is a list of all of
the ShipmentObj(s) and all of their childern.
This is a logistics application where we have an input file which
contains all the "stops" information. These stop records are used to
populate our entity objects. The top entity is a collection of
ShipmentObj(ects). Each of these ShipmentObj contain collections (or
lists if you will) of other objects like TimeWindowsList, VehicleList,
and DepotList objects that can be a variable number of items. I was
reading through the Build pattern that you had mentioned and it looks
similar to what I am discussing here. I understand how I can inject
the ShipmentCollection object into the ShipmentManager so that the
manager is not coupled directly to the collection and I can then
inject a test object instead to test the ShipmentManager. Since the
ShipmentCollection will contain ShipmentObj(s) would that mean that I
would have to inject the Builder to create the ShipmentObj(s) so that
I can inject a list of test objects instead? I am trying to figure out
how to create a collection of ShipmentObjs without having a loop that
"news" up one and then adds it to the collection. That couples the
collection class to the ShipmentObj class, right? And that is one of
the things that we are trying to avoid, correct?
I feel like I am missing something, but not sure what. :) I'm sorry I
can't seem to be able to explain this more clearly.
thanks!
Bill
> I don't know anything about your domain. You have a method call
> GetShipment(IList<string> list) that returns a ShipmentObj, is that correct?
> Is it querying for the shipment from a data store or are you simply
> constructing a ShipmentObj?
>