| 22 | using namespace openstudio::model; |
| 23 | |
| 24 | TEST_F(ModelFixture, SurfaceControlMovableInsulation_SurfaceControlMovableInsulation) { |
| 25 | // create a model to use |
| 26 | Model model; |
| 27 | |
| 28 | // create a surface to use |
| 29 | std::vector<Point3d> vertices; |
| 30 | vertices.push_back(Point3d()); |
| 31 | vertices.push_back(Point3d(1, 0, 0)); |
| 32 | vertices.push_back(Point3d(1, 1, 0)); |
| 33 | vertices.push_back(Point3d(0, 1, 0)); |
| 34 | Surface surface(vertices, model); |
| 35 | |
| 36 | // create a material object to use |
| 37 | StandardOpaqueMaterial material(model); |
| 38 | |
| 39 | // surface doesn't have control movable insulation yet |
| 40 | ASSERT_FALSE(surface.surfaceControlMovableInsulation()); |
| 41 | |
| 42 | // create a surface control movable insulation object to use |
| 43 | SurfaceControlMovableInsulation mi(surface, material); |
| 44 | ASSERT_TRUE(surface.surfaceControlMovableInsulation()); |
| 45 | EXPECT_EQ(mi.insulationType(), "Outside"); |
| 46 | Surface surface2 = mi.surface(); |
| 47 | EXPECT_EQ(surface, surface2); |
| 48 | EXPECT_EQ(surface2.surfaceControlMovableInsulation().get(), mi); |
| 49 | Schedule schedule = mi.schedule(); |
| 50 | boost::optional<ScheduleConstant> scheduleConstant = schedule.optionalCast<ScheduleConstant>(); |
| 51 | ASSERT_TRUE(scheduleConstant); |
| 52 | EXPECT_EQ((*scheduleConstant).value(), 1.0); |
| 53 | } |
| 54 | |
| 55 | // test setting and getting |
| 56 | TEST_F(ModelFixture, SurfaceControlMovableInsulation_SetGetFields) { |
nothing calls this directly
no test coverage detected