public object FindBy(string criteria, params int[] value) { Query <int> query = new GlossaryQuery(); query.Criterias(new NewCriteria <int>("=", criteria, value)); return(query.Execute()); }
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); }