Пример #1
0
            public void GetShipperByIDTest()
            {
                Order_ManagerDAL dal = new Order_ManagerDAL(ConfigurationManager.ConnectionStrings["Order_Manager"].ConnectionString);
                var result = dal.GetOrder_ManagerById(13);
                Assert.IsTrue(result.O_M_id == 13, "returned ID does not match request");

            }
Пример #2
0
            public void DeleteShipperTest()
            {
                Order_ManagerDAL dal = new Order_ManagerDAL(ConfigurationManager.ConnectionStrings["Order_Manager"].ConnectionString);
                dal.DeleteOrder_Manager(13);

                Assert.IsTrue(dal.GetOrder_ManagerById(13).O_M_id != 13, "item still in db"); ;

            }
Пример #3
0
            public void UpdateShipperTest()
            {
                Order_ManagerDAL dal = new Order_ManagerDAL(ConfigurationManager.ConnectionStrings["Order_Manager"].ConnectionString);
                var shupper = dal.GetOrder_ManagerById(13);
                Order_ManagerDTO upd = new Order_ManagerDTO
                {
                    Userid = 2,
                    O_M_frist_name = "fname",
                    O_M_last_name = "lname",
                    O_M_login = "******",
                    O_M_e_mail = "email1",
                    salary = 10000,
                };

                var result = dal.UpdateOrder_Manager(upd);

                Assert.IsTrue(result.O_M_e_mail == "Updated", "Order_Manager was not updated");

            }