public void GetShipperByIDTest()
        {
            ShipperDAL dal    = new ShipperDAL(ConfigurationManager.ConnectionStrings["Shipper"].ConnectionString);
            var        result = dal.GetShipperById(13);

            Assert.IsTrue(result.ShipperID == 13, "returned ID does not match request");
        }
        public void DeleteShipperTest()
        {
            ShipperDAL dal = new ShipperDAL(ConfigurationManager.ConnectionStrings["Shipper"].ConnectionString);

            dal.DeleteShipper(13);

            Assert.IsTrue(dal.GetShipperById(13).ShipperID != 13, "item still in db");;
        }
        public void UpdateShipperTest()
        {
            ShipperDAL dal     = new ShipperDAL(ConfigurationManager.ConnectionStrings["Shipper"].ConnectionString);
            var        shupper = dal.GetShipperById(13);
            ShipperDTO upd     = new ShipperDTO
            {
                ShipperID   = 13,
                EMail       = "Updated",
                Addres      = "Updated",
                Phone       = "Updated",
                Description = "Updated"
            };

            var result = dal.UpdateShipper(upd);

            Assert.IsTrue(result.EMail == "Updated", "Shipper was not updated");
        }
 public Task <Shipper> GetShipperById(int ShipperId)
 {
     return(Task.FromResult(ShipperDAL.GetShipperById(ShipperId)));
 }