/// <summary> /// PersonalInfo_Load function /// </summary> /// <remarks> /// Initialize the remaining part in this form. Create and save the stock objects. /// </remarks> private void PersonalInfo_Load() { //Create the stock objects, they will be saved in file. //In future those initialization won't be here and the system will only read the from file. //Future function of the system will be to allow the user to create those objects. Car car1 = new Car("BMW", "RC0215GP", "Stock", "diesel", "Stock", 50000.0, "bmw_white.jpg", 450, "stock", "Stock"); Car car2 = new Car("Mercedes", "RC56987MD", "Stock", "diesel", "Stock", 40000.0, "mercedes_white.jpg", 420, "stock", "Stock"); Motorcycle motor1 = new Motorcycle("Yamaha", "RC1245OR", "Stock", "diesel", "Stock", 10000.0, "photo.img", 1000); Bike bike1 = new Bike("BMX", "Stock", "street", "Stock", 500.0, "photo.img"); Bike bike2 = new Bike("Scott", "Stock", "mountain", "Stock", 900.0, "photo.img"); modlist.Add(car1); modlist.Add(car2); modlist.Add(motor1); modlist.Add(bike1); modlist.Add(bike2); modlist.SaveInFile(true); modlist.ReadFromFile(true); Debug.WriteLine("ListSize() in PersonalInfo: " + modlist.ListSize()); // check the size of the list }
public void TestCleanUp() { car = null; motorcycle = null; }
public void TestInitialize() { car = new Car(); motorcycle = new Motorcycle(); }