/// <summary>
        /// Updates the shipment order product variant
        /// </summary>
        /// <param name="sopv">Shipment order product variant</param>
        public virtual void UpdateShipmentOrderProductVariant(ShipmentOrderProductVariant sopv)
        {
            if (sopv == null)
            {
                throw new ArgumentNullException("sopv");
            }

            _sopvRepository.Update(sopv);

            //event notification
            _eventPublisher.EntityUpdated(sopv);
        }
Esempio n. 2
0
        public void Can_save_and_load_shipmentOrderProductVariant()
        {
            var sopv = new ShipmentOrderProductVariant()
            {
                Shipment = GetTestShipment(),
                OrderProductVariantId = 2,
                Quantity = 3,
            };

            var fromDb = SaveAndLoadEntity(sopv);

            fromDb.ShouldNotBeNull();
            fromDb.Shipment.ShouldNotBeNull();
            fromDb.OrderProductVariantId.ShouldEqual(2);
            fromDb.Quantity.ShouldEqual(3);
        }