예제 #1
0
 public void Initialize()
 {
     db.ClearTables();
     XmlToListImporter.LoadControllerEventLog("7185_10_17_2017.xml", db);
     XmlToListImporter.LoadSignals("signals.xml", db);
     XmlToListImporter.LoadApproaches("approachesfor7185.xml", db);
     XmlToListImporter.LoadDetectors("detectorsFor7185.xml", db);
     XmlToListImporter.AddDetectionTypesToDetectors
         ("DetectorTypesforDetectorsFor7185.xml", db);
     XmlToListImporter.AddDetectionTypesToMetricTypes("mtdt.xml", db);
     MOE.Common.Models.Repositories.SignalsRepositoryFactory.SetSignalsRepository(
         new InMemorySignalsRepository(db));
     MetricTypeRepositoryFactory.SetMetricsRepository(new InMemoryMetricTypeRepository(db));
     ApplicationEventRepositoryFactory.SetApplicationEventRepository(
         new InMemoryApplicationEventRepository(db));
     Models.Repositories.DirectionTypeRepositoryFactory.SetDirectionsRepository(
         new InMemoryDirectionTypeRepository());
     ApproachRepositoryFactory.SetApproachRepository(new InMemoryApproachRepository(db));
     ControllerEventLogRepositoryFactory.SetRepository(new InMemoryControllerEventLogRepository(db));
     DetectorRepositoryFactory.SetDetectorRepository(new InMemoryDetectorRepository(db));
 }
예제 #2
0
 public static void InitializeTestDataFor7185Feb012018(InMemoryMOEDatabase db)
 {
     db.ClearTables();
     XmlToListImporter.LoadControllerEventLog("7185Events02_01_2018.Xml", db);
     XmlToListImporter.LoadSignals("signals.xml", db);
     XmlToListImporter.LoadApproaches("approachesfor7185.xml", db);
     XmlToListImporter.LoadDetectors("detectorsFor7185.xml", db);
     XmlToListImporter.AddDetectionTypesToDetectors
         ("DetectorTypesforDetectorsFor7185.xml", db);
     XmlToListImporter.AddDetectionTypesToMetricTypes("mtdt.xml", db);
     MOE.Common.Models.Repositories.SignalsRepositoryFactory.SetSignalsRepository(
         new InMemorySignalsRepository(db));
     MetricTypeRepositoryFactory.SetMetricsRepository(new InMemoryMetricTypeRepository(db));
     ApplicationEventRepositoryFactory.SetApplicationEventRepository(
         new InMemoryApplicationEventRepository(db));
     DirectionTypeRepositoryFactory.SetDirectionsRepository(
         new InMemoryDirectionTypeRepository());
     SpeedEventRepositoryFactory.SetSignalsRepository(new InMemorySpeedEventRepository(db));
     ApproachRepositoryFactory.SetApproachRepository(new InMemoryApproachRepository(db));
     ControllerEventLogRepositoryFactory.SetRepository(new InMemoryControllerEventLogRepository(db));
     DetectorRepositoryFactory.SetDetectorRepository(new InMemoryDetectorRepository(db));
     XmlToListImporter.LoadSpeedEvents("7185speed.xml", db);
 }