public void AddPartOrder() { var partOrderCtr = new PartOrderCtr(new PartOrderTestClass()); var partOrder = new PartOrder(1, new Product(), 2, 10, new Cart()); var flag = partOrderCtr.AddPartOrder(partOrder); Assert.AreEqual(1, flag); }
/// <summary> /// Initialize all Controllers /// </summary> public BestilNemtService() { LoginCtr = new LoginCtr(new DbLogin()); CustomerCtr = new CustomerCtr(new DbCustomer()); ShopController = new ShopCtr(new DbShop()); ChainCtr = new ChainCtr(new DbChain()); AdminCtr = new AdminCtr(new DbAdmin()); ProductCtr = new ProductCtr(new DbProduct()); CartCtr = new CartCtr(new DbCart()); PartOrderCtr = new PartOrderCtr(new DbPartOrder()); SavingCtr = new SavingCtr(new DbSaving()); WarehouseCtr = new WarehouseCtr(new DbWarehouse()); }
public void PartOrderInitialize() { var partOrderCtr = new PartOrderCtr(new PartOrderTestClass()); Assert.IsNotNull(partOrderCtr); }
///// <summary> ///// Update a Login ///// </summary> ///// <param name="login"></param> ///// <returns> ///// Return 1 if Login was updated, else 0 ///// </returns> //public int UpdateLogin(Login login) //{ // return LoginCtr.UpdateLogin(login); //} /// <summary> /// Add a PartOrder /// </summary> /// <param name="partOrder"></param> /// <returns> /// Id of PartOrder if added, else 0 /// </returns> public int AddPartOrder(PartOrder partOrder) { return(PartOrderCtr.AddPartOrder(partOrder)); }