Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using CustomerMaintenanceClasses;
- namespace CustomerTests
- {
- class Program
- {
- static void CustomerTest()
- {
- Customer c1 = new Customer();
- Customer c2 = new Customer("Mari", "Good", "goodm@lanecc.edu");
- Console.WriteLine("Testing both constructors");
- Console.WriteLine("Default constructor. Expecting default values. " + c1);
- Console.WriteLine("Overloaded constructor. Expecting Mari Good (goodm@lanecc.edu). " + c2);
- Console.WriteLine();
- Console.WriteLine("Testing setters");
- c1.FirstName = "Mickey";
- c1.LastName = "Mouse";
- c1.Email = "mmouse@disney.com";
- Console.WriteLine("Expecting Mickey Mouse (mmouse@disney.com) " + c1.ToString());
- Console.WriteLine();
- Console.WriteLine("Testing getters");
- Console.WriteLine("FirstName. Expecting Mickey. " + c1.FirstName);
- Console.WriteLine("LastName. Expecting Mouse. " + c1.LastName);
- Console.WriteLine("Email. Expecting mmouse@disney.com. " + c1.Email);
- /*Customer c30 = new Customer();
- c30.Email = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz@asdf.com";
- Console.WriteLine("Email: {0}", c30.Email);*/
- Customer zach = new Customer();
- Customer zach2 = new Customer();
- zach.FirstName = "Za";
- zach2.FirstName = "ch";
- zach.LastName = "Re";
- zach2.LastName = "ese";
- zach.Email = "elroyjr";
- zach2.Email = "@gmail.com";
- Customer c3 = new Customer();
- c3.FirstName = zach.FirstName + zach2.FirstName;
- c3.LastName = zach.LastName + zach2.LastName;
- c3.Email = zach.Email + zach2.Email;
- Console.WriteLine("\n" + "Customer 3 " + "\n" + "Firstname: {0}" + "\n" + "Lastname: {1}" + "\n" + "Email: {2}", c3.FirstName, c3.LastName, c3.Email);
- list += c3;
- }
- public static void CustomerListTest()
- {
- CustomerList list = new CustomerList();
- }
- static void Main(string[] args)
- {
- CustomerTest();
- CustomerListTest();
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement