public void Test_CheckNameShopeInDb(string nameShope, bool expected) { try { dAOEntity_ = new DAOEntity_Framfork(); bool resulte = dAOEntity_.CheckNameShopeInDb(nameShope); NUnit.Framework.Assert.AreEqual(expected, resulte); } catch (ArgumentNullException) { } catch (Exception) { Assert.Fail(); } }
public void GetAllProduct(string nameShope, bool isShopDB) { ManagerShope.listProduct = new List <Product>(); try { dAOEntity_ = new DAOEntity_Framfork(); object result = dAOEntity_.GetAllProduct(nameShope, isShopDB); if (isShopDB) { Assert.IsNull(result); } else { Assert.IsNotNull(result); } } catch (ArgumentNullException) { } catch (Exception) { Assert.Fail(); } }
public void Test_CheckInDbOnDate(string nameShope, string day, bool expected) { string dataTime = null; try { dAOEntity_ = new DAOEntity_Framfork(); if (day == "ToDay") { dataTime = DateTime.Today.ToLongDateString(); } else if (day == "ToMorrow") { dataTime = DateTime.Today.AddDays(1).ToLongDateString(); } bool resulte = dAOEntity_.CheckInDbOnDate(nameShope, dataTime); NUnit.Framework.Assert.AreEqual(expected, resulte); } catch (ArgumentNullException) { } catch (Exception) { Assert.Fail(); } }
public ManagerShope() { _dAOEntity_Framfork = new DAOEntity_Framfork(); }