Beispiel #1
0
        public void InitializeTestController()
        {
            this.testManufacturers = new [] { "SomeManufacturer", "SomeManufacturer" };
            string[] testModels = { "SomeModel", "AnotherModel"};
            string[] testEnergyEfficiencyRatings = { "A", "B" };

            const int TestMark = 0;
            const int TestPowerUsage = 5;
            const int NumberOfReports = 2;

            this.testAirConditioner =
                new AirConditioner(
                    this.testManufacturers[0],
                    testModels[0],
                    testEnergyEfficiencyRatings[0],
                    TestPowerUsage);

            this.testReports = new Report[NumberOfReports];

            for (int i = 0; i < NumberOfReports; i++)
            {
                this.testReports[i] = new Report(this.testManufacturers[i], testModels[i], TestMark);
            }

            this.testRepository = new Repository();
        }
Beispiel #2
0
 public Controller(Engine engine, Repository repository)
 {
     this.engine = engine;
     this.repository = repository;
 }
Beispiel #3
0
 public Engine(IUserInterface userInterface)
 {
     this.repository = new Repository();
     this.controller = new Controller(this, this.repository);
     this.userInterface = userInterface;
 }