public void Default_BasketPackagingStrategy_Returns_A_Shipment() { //// Arrange var notShippable = PreTestDataWorker.MakeExistingProduct(false); _basket.AddItem(notShippable); var destination = new Address() { Name = "San Diego Zoo", Address1 = "2920 Zoo Dr", Locality = "San Diego", Region = "CA", PostalCode = "92101", CountryCode = "US" }; _basket.AddItem(notShippable); //// Act var strategy = new DefaultWarehousePackagingStrategy(MerchelloContext.Current, _basket.Items, destination, Guid.NewGuid()); var shipments = strategy.PackageShipments(); //// Assert Assert.NotNull(shipments); Assert.AreEqual(1, shipments.Count()); Assert.AreEqual(4, shipments.First().Items.Count); }
public void Default_BasketPackagingStrategy_Returns_A_Shipment() { //// Arrange var destination = new Address() { Name = "San Diego Zoo", Address1 = "2920 Zoo Dr", Locality = "San Diego", Region = "CA", PostalCode = "92101", CountryCode = "US" }; //// Act var strategy = new DefaultWarehousePackagingStrategy(MerchelloContext, _basket.Items, destination, Guid.NewGuid()); var shipments = strategy.PackageShipments(); //// Assert Assert.NotNull(shipments); Assert.AreEqual(1, shipments.Count()); }