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); }
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)); }