| 23 | void OSVersionFixture::TearDown() {} |
| 24 | |
| 25 | void OSVersionFixture::SetUpTestSuite() { |
| 26 | // set up logging |
| 27 | logFile = FileLogSink(toPath("./OSVersionFixture.log")); |
| 28 | logFile->setLogLevel(Debug); |
| 29 | Logger::instance().standardOutLogger().disable(); |
| 30 | |
| 31 | // create and popluate resource folder |
| 32 | openstudio::path thisVersionPath = versionResourcesPath(openstudio::VersionString(openStudioVersion())); |
| 33 | if (!openstudio::filesystem::exists(thisVersionPath)) { |
| 34 | openstudio::filesystem::create_directories(thisVersionPath); |
| 35 | } |
| 36 | |
| 37 | // ETH@20120514 Eventually this cpp file should be configured by CMake so OpenStudio.idd can be |
| 38 | // directly copied over, and so all these items can be copied back into source. |
| 39 | model::Model model = openstudio::model::exampleModel(); |
| 40 | model.save(thisVersionPath / toPath("example.osm"), true); |
| 41 | model::Component component = model.getConcreteModelObjects<model::Construction>()[0].createComponent(); |
| 42 | component.save(thisVersionPath / toPath("example.osc"), true); |
| 43 | IddFile iddFile = IddFactory::instance().getIddFile(IddFileType::OpenStudio); |
| 44 | iddFile.save(thisVersionPath / toPath("OpenStudio.idd"), true); |
| 45 | } |
| 46 | |
| 47 | void OSVersionFixture::TearDownTestSuite() { |
| 48 | logFile->disable(); |
nothing calls this directly
no test coverage detected