public void CustomerAccess_FillGlossary_TestMethod() { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Gender"].Rows.Count > 0); }
public void CustomerAccess_GetCustomersByBirthday_TestMethod(int year, int m, int day) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetCustomersByBirthOfDay(new DateTime(year, m, day)); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void CustomerAccess_GetCustomersByBirthdayBetween_TestMethod() { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetCustomersByBirthdayBetween(new DateTime(1970, 1, 1), new DateTime(2016, 01, 01)); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void CustomerAccess_GetCustomersByGlossary_TestMethod(string name, string glossary, int Id) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetCustomersByGlossary(name, glossary, Id); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void CustomerAccess_GetCustomersByID_TestMethod(int id) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetCustomersByID(id); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void CustomerAccess_GetByAddress_TestMethod(string addr) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetDataByCriteria("Address", new[] { "Славянск", addr }); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void Query_CustomerQuery_ExecuteMethod_TestMethod() { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); DataSet dataSet; NewCriteria <int> criteria = new NewCriteria <int>("=", "ID", 1); CustomerQuery <int> customerQuery = new CustomerQuery <int>(); customerQuery.Criterias(criteria); dataSet = (DataSet)customerQuery.Execute(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void Query_GlossaryQuery_ExecuteMethod_TestMethod(string nameGlossary, int id) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); DataSet dataSet = (DataSet)CustomerAccess.GetData(); NewCriteria <int> criteria = new NewCriteria <int>("=", nameGlossary, id); GlossaryQuery glossary = new GlossaryQuery(); glossary.Criterias(criteria); dataSet = (DataSet)glossary.Execute(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public void CustomerAccess_GetDataByCriteria_TestMethod(string lastname1, string addr1, string lastName2, string addr2) { SqlConnection connection = ConnectionManager.Connection; connection.Open(); CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); CustomerAccess.GetDataByCriteria("LastName", new[] { lastname1 }, "="); CustomerAccess.GetDataByCriteria("Address", new [] { "Славянск", addr1 }, "="); CustomerAccess.GetDataByCriteria("LastName", new[] { lastName2, }, "="); CustomerAccess.GetDataByCriteria("Address", new[] { "Славянск", addr2 }, "="); DataSet dataSet = (DataSet)CustomerAccess.GetData(); Assert.IsTrue(dataSet.Tables["Customer"].Rows.Count > 0); }
public object FillAll() { CustomerAccess.FillDictionary(); CustomerAccess.FillCustomerData(); return(CustomerAccess.GetData()); }