TEST_F(gbXMLFixture, ReverseTranslator_ZNETH)
{
  //openstudio::Logger::instance().standardOutLogger().enable();
  //openstudio::Logger::instance().standardOutLogger().setLogLevel(Debug);

  openstudio::path inputPath = resourcesPath() / openstudio::toPath("gbxml/ZNETH.xml");
  openstudio::path outputPath = resourcesPath() / openstudio::toPath("gbxml/ZNETH2.xml");

  openstudio::gbxml::ReverseTranslator reverseTranslator;
  boost::optional<openstudio::model::Model> model = reverseTranslator.loadModel(inputPath);
  ASSERT_TRUE(model);

  model->save(resourcesPath() / openstudio::toPath("gbxml/ZNETH.osm"), true);

  // add test to see that surfaces that reference two spaces get "surface" boundary condition
  // e.g. surface named "su-76" should have "Surface" string for OutsideBoundaryCondition
  OptionalSurface osurf = model->getModelObjectByName<Surface>("su-76");
  ASSERT_TRUE(osurf);
  EXPECT_EQ("Surface",osurf->outsideBoundaryCondition());

  openstudio::energyplus::ForwardTranslator energyPlusTranslator;
  openstudio::Workspace workspace = energyPlusTranslator.translateModel(*model);

  EXPECT_TRUE(workspace.numObjects() > 0);

  workspace.save(resourcesPath() / openstudio::toPath("gbxml/ZNETH.idf"), true);

  openstudio::gbxml::ForwardTranslator forwardTranslator;
  bool test = forwardTranslator.modelToGbXML(*model, outputPath);
  EXPECT_TRUE(test);
}
TEST_F(EnergyPlusFixture,ReverseTranslatorTest_LargeOffice) {
  openstudio::path inputPath = resourcesPath() / openstudio::toPath("energyplus/RefLargeOffice/RefBldgLargeOfficeNew2004_Chicago.idf");
  Workspace ws = Workspace::load(inputPath).get();
  ReverseTranslator rt;
  Model model = rt.translateWorkspace(ws);

  // surface named "Core_top_ZN_5_Floor" should have "Adiabatic" string for outsideBoundaryCondition
  OptionalSurface osurf = model.getModelObjectByName<Surface>("Core_top_ZN_5_Floor");
  ASSERT_TRUE(osurf);
  EXPECT_EQ("Adiabatic",osurf->outsideBoundaryCondition());
}