MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / SetUpTestSuite

Method SetUpTestSuite

src/osversion/test/OSVersionFixture.cpp:25–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23void OSVersionFixture::TearDown() {}
24
25void 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
47void OSVersionFixture::TearDownTestSuite() {
48 logFile->disable();

Callers

nothing calls this directly

Calls 9

exampleModelFunction · 0.85
setLogLevelMethod · 0.80
standardOutLoggerMethod · 0.80
createComponentMethod · 0.80
getIddFileMethod · 0.80
VersionStringClass · 0.70
toPathFunction · 0.50
disableMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected