public void GetElectricList_ShouldWork() { ElectricRepo testRepo = new ElectricRepo(); List <ElectricClass> _listOfElectrics = testRepo.GetElectricList(); Console.WriteLine(_listOfElectrics); }
} //-end of DisplayGreenPlan()- // case 1 private void ViewAllElectric() { Console.Clear(); List <ElectricClass> _listOfElectrics = _electricRepo.GetElectricList(); // Shows list to user foreach (ElectricClass electric in _listOfElectrics) { Console.WriteLine($"Make: {electric.Make}\n" + $"Model: {electric.Model}\n" + $"Year: {electric.Year}\n" + $"Price: ${electric.Price}\n" + $"Miles per battery: {electric.Miles} miles\n"); } } //-end of ViewAllElectric()-