예제 #1
0
        public void CheckIfQueryingANonExistingPackageReturnsNull()
        {
            ShipmentBusiness          shipmentBusiness = new ShipmentBusiness(_baseFixture.MockedShipmentPackageGenerator, _baseFixture.MockedCache);
            List <ShipmentPackageDTO> shipmentPackages = shipmentBusiness.GetShipmentPackages();
            ShipmentPackageDTO        shipmentPackage  = shipmentPackages.First();

            ShipmentPackageDTO queriedShipmentPackage = shipmentBusiness.QuerySpecificPackage(shipmentPackage.PackageNumber + "asd");

            Assert.True(queriedShipmentPackage == null);
        }
예제 #2
0
        public void CheckIfQueryingAnExistingPackageReturnsValidPackage()
        {
            ShipmentBusiness          shipmentBusiness = new ShipmentBusiness(_baseFixture.MockedShipmentPackageGenerator, _baseFixture.MockedCache);
            List <ShipmentPackageDTO> shipmentPackages = shipmentBusiness.GetShipmentPackages();
            ShipmentPackageDTO        shipmentPackage  = shipmentPackages.First();

            ShipmentPackageDTO queriedShipmentPackage = shipmentBusiness.QuerySpecificPackage(shipmentPackage.PackageNumber);

            Assert.True(queriedShipmentPackage != null && queriedShipmentPackage.Equals(shipmentPackage));
        }