public void ReportByNameMethodNoneFound() { clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); FilteredCustomers.ReportByName("yyy"); Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportByNameTestDataFound() { clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); Boolean OK = true; FilteredCustomers.ReportByName("test"); if (FilteredCustomers.Count == 2) { if (FilteredCustomers.CustomerList[0].CustomerId != 17) { OK = false; } if (FilteredCustomers.CustomerList[1].CustomerId != 18) { OK = false; } } else { OK = false; } Assert.IsTrue(OK); }
public void ReportByNameDataFound() { //filtered data instance clsCustomerCollection FilteredNames = new clsCustomerCollection(); Boolean OK = true; //apply a name from the list FilteredNames.ReportByName("a"); if (FilteredNames.Count == 1) { //ID of customer is 16 if (FilteredNames.CustomerList[0].CustomerId != 16) { OK = false; } //ID of customer is 19 if (FilteredNames.CustomerList[1].CustomerId != 19) { OK = false; } } else { OK = false; } Assert.IsTrue(OK); }
public void ReportByNameMethodOK() { clsCustomerCollection AllCustomers = new clsCustomerCollection(); clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); FilteredCustomers.ReportByName(""); Assert.AreEqual(AllCustomers.Count, FilteredCustomers.Count); }
public void ReportByNameNoneFound() { //filtered data instance clsCustomerCollection FilteredNames = new clsCustomerCollection(); //apply a name that does not exist FilteredNames.ReportByName("abc"); //test to see that there are no records Assert.AreEqual(0, FilteredNames.Count); }
public void ReportByNameOK() { //normal instance clsCustomerCollection AllCustomers = new clsCustomerCollection(); //filtered data instance clsCustomerCollection FilteredNames = new clsCustomerCollection(); //empty filtered name FilteredNames.ReportByName(""); Assert.AreEqual(AllCustomers.Count, FilteredNames.Count); }
public void ReportByNameOK() { clsCustomerCollection filteredCustomers = new clsCustomerCollection(); Boolean OK = true; filteredCustomers.ReportByName(""); //????????? if (filteredCustomers.Count == 2) { if (filteredCustomers.CustomerList[0].CustomerId != 2) { OK = false; } if (filteredCustomers.CustomerList[1].CustomerId != 3) { OK = false; } } Assert.IsTrue(OK); }