My shipment has an array of products, but I don't understand how to reference to do that array of product. I am trying to setup the unit test enviroment and need to make test data available.
shipment module
asset Shipment identified by shipmentId{
o String shipmentId
--> Product[] allProducts
--> participant owner
}
and unit-test
const shipment = factory.newResource(namespace, 'Shipment', '001');
shipment.allProducts = factory.newRelationship(namespace, participant, /** what to do here */ )
or can I just pass an array of products like:
shipment.allProducts = products
The reason I am doubting this solution is because I need to use the factory newRelationship function. If you have a suggestion, that would be helpful.