public void GetCtrDbChain() { var chainCtr = new ChainCtr(new DbChain()); var chain = chainCtr.GetChain(1); Assert.IsNotNull(chain); }
/// <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 GetAllCtrDbChain() { var chainCtr = new ChainCtr(new DbChain()); Assert.AreNotEqual(0, chainCtr.GetAllChains().Count); }
public void ChainCtrInitialize() { var chainCtr = new ChainCtr(new ChainCtrTestClass()); Assert.IsNotNull(chainCtr); }
/// <summary> /// Get a Chain DataTable /// </summary> /// <returns> /// DataTable /// </returns> public DataTable GetChainData() { return(ChainCtr.GetChainData()); }
/// <summary> /// Get all Chains /// </summary> /// <returns> /// List of Chain /// </returns> public List <Chain> GetAllChains() { return(ChainCtr.GetAllChains()); }
///// <summary> ///// Add a Chain ///// </summary> ///// <param name="chain"></param> ///// <returns> ///// id of Chain if added, else 0 ///// </returns> //public int AddChain(Chain chain) //{ // return ChainCtr.AddChain(chain); //} /// <summary> /// Get a Chain by id /// </summary> /// <param name="id"></param> /// <returns> /// Chain if found, else null /// </returns> public Chain GetChain(int id) { return(ChainCtr.GetChain(id)); }