public void ReportByNameMethodOK() { //create an instance of the classes we want to create clsCustomerCollection AllCustomers = new clsCustomerCollection(); clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); FilteredCustomers.ReportByName(""); //test to see that it passes Assert.AreEqual(AllCustomers.Count, FilteredCustomers.Count); }
public void ReportByNameNoneFound() { //create an instance of the classes we want to create clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //non existing data created to see if it finds it FilteredCustomers.ReportByName("xxxxx xxxxx"); //test to see that it passes Assert.AreEqual(0, FilteredCustomers.Count); }
//function to delete the selected customer record void DeleteCustomer() { //create a new instance of the customer collection class clsCustomerCollection CustomerList = new clsCustomerCollection(); //find the record to delete CustomerList.ThisCustomer.Find(CustomerID); //delete the record CustomerList.Delete(); }
public void FilterBySurnameNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a post code that doesn't exist FilteredCustomers.FilterBySurname("a"); //test to see that there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportByCustomerLastNameNoneFound() { //create an instance of the filtrered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a customer last name that doesn't exist FilteredCustomers.ReportByCustomerLastName("xxx xxx"); //test to see that there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
protected void btnYes_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.ThisCustomer.Find(CustomerId); Customers.Delete(); Response.Redirect("CustomerList.aspx"); }
public void ReportByEmailNotFound() { //create an instance of the filtered adata clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a post code that doesnt exist FilteredCustomers.ReportByEmail("*****@*****.**"); //test to see that there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportbyCustomerNameNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomerName = new clsCustomerCollection(); //test to see that the are no records; FilteredCustomerName.ReportByCustomerName("xxx xxx"); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomerName.Count); }
public void ReportByPostCodeNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a blank string (should return all records) FilteredCustomers.ReportByPostCode("XXXX XXX"); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomers.Count); }
//ensures the count function is working public void CountCustomersOK() { clsCustomerCollection AllCustomers = new clsCustomerCollection(); int Count = 7; AllCustomers.Count = Count; Assert.AreEqual(AllCustomers.Count, Count); }
public void ReportByNameMethodOk() { clsCustomerCollection AllCustomers = new clsCustomerCollection(); clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); FilteredCustomers.ReportByName(""); Assert.AreEqual(AllCustomers.Count, FilteredCustomers.Count); }
protected void btnAddressSearch_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.FilterByAddress(txtAddress.Text); lstCustomers.DataSource = Customers.CustomerList; lstCustomers.DataValueField = "Customer_id"; lstCustomers.DataTextField = "Name"; lstCustomers.DataBind(); }
protected void btnMarketingSearch_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.FilterByMarketingPreference(Convert.ToBoolean(lstPreference.Text)); lstCustomers.DataSource = Customers.CustomerList; lstCustomers.DataValueField = "Customer_id"; lstCustomers.DataTextField = "Name"; lstCustomers.DataBind(); }
void DeleteCustomer() { //create a new instance of the customers clsCustomerCollection Customers = new clsCustomerCollection(); //find the record to delete Customers.ThisCustomer.Find(CustomerNo); //delete the record Customers.Delete(); }
public void ReportByPhoneNoNoneFound() { //create an instance of filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a blank string (Should return all records) FilteredCustomers.ReportByPhoneNo("12345678910"); //test to see there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportBySurnameNoneFound() { // Create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); // Apply a surname that doesn't exist FilteredCustomers.ReportBySurname("XYZ"); // Test to see that there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportByEmailNoneFound() { //instance of the filterd data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply apost code that dosent exist FilteredCustomers.ReportByEmail("xxxxxxxx"); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomers.Count); }
protected void btnApply_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.ReportByName(txtEnterName.Text); lstCustomerList.DataSource = Customers.CustomerList; lstCustomerList.DataValueField = "CustomerId"; lstCustomerList.DataTextField = "Name"; lstCustomerList.DataBind(); }
public void FilterByEmailAddressNoneFound() { //Create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //Apply a first name that doesn't exist FilteredCustomers.FilterByEmailAddress("*****@*****.**"); //Check to see that there are no records Assert.AreEqual(0, FilteredCustomers.Count); }
protected void btnApply_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.ReportByFullName(txtFilter.Text); lstCustomerList.DataSource = Customers.CustomerList; lstCustomerList.DataValueField = "ProductNo"; lstCustomerList.DataTextField = "FullName"; lstCustomerList.DataBind(); }
public void ReportByUsernameNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredUsernames = new clsCustomerCollection(); //apply a username that doesnt exsit FilteredUsernames.ReportByUsername("xxxx"); //test to see that there are no records Assert.AreEqual(0, FilteredUsernames.Count); }
public void ReportByPostcodeNoneFound() { //create an instance of the clsCustomerCollection class clsCustomerCollection FilteredPostcodes = new clsCustomerCollection(); //apply a postcode that doesnt exist FilteredPostcodes.ReportByPostcode("xxx xxx"); //test to see that the two values are the same Assert.AreEqual(0, FilteredPostcodes.Count); }
public void ReportBySurNameNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a surname that doesn't exist FilteredCustomers.ReportBySurName("xxxxx"); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomers.Count); }
public void FilterByCustomerIdNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomer = new clsCustomerCollection(); //apply a blank string (should return all records); FilteredCustomer.FilterByCustomerID(0); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomer.Count); }
public void ReportByPostCodeNoneFound() { //create an instance of the class containing unfilitered results clsCustomerCollection data = new clsCustomerCollection(); //use an email that doesn't exist data.ReportByEmail("[email protected]"); //compare values Assert.AreEqual(0, data.Count); }
public void FilterbyeMailNoneFound() { //create an instance of the filtered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(" "); //apply a blank string (should return all records) FilteredCustomers.Filterbyemail("xxx xxx"); //test to see the two values are the same Assert.AreEqual(0, FilteredCustomers.Count); }
public void ReportByFirstNameNoneFound() { //create an instance of the class containing unfiltered results clsCustomerCollection FilteredCustomer = new clsCustomerCollection(); //apply first name that doesn't exist FilteredCustomer.ReportByFirstName("N Faquir"); //test to see that the two values are the same Assert.AreEqual(0, FilteredCustomer.Count); }
protected void btnClear_Click(object sender, EventArgs e) { clsCustomerCollection Customers = new clsCustomerCollection(); Customers.ReportByName(""); txtFilter.Text = ""; lstCustomerList.DataSource = Customers.CustomerList; lstCustomerList.DataValueField = "CustomerId"; lstCustomerList.DataTextField = "CustomerName"; lstCustomerList.DataBind(); }
public void ReportByEmailMethodOK() { //createa an instance of the calss contaion unfiltered results clsCustomerCollection AllCustomers = new clsCustomerCollection(); //create an instance of the fultered data clsCustomerCollection FilteredCustomers = new clsCustomerCollection(); //apply a blank string FilteredCustomers.ReportByEmail(""); //test to see that the two values are the same Assert.AreEqual(AllCustomers.Count, FilteredCustomers.Count); }
protected void Button1_Click(object sender, EventArgs e) { //create new instance of customer collection class clsCustomerCollection CustomerBook = new clsCustomerCollection(); CustomerBook.ThisCustomer.Find(CustomerId); //invoke the delete method CustomerBook.Delete(); //redirect to customer list once confirmed Response.Redirect("CustomerList.aspx"); }