| 23 | using namespace openstudio::model; |
| 24 | |
| 25 | TEST_F(ModelFixture, ShadingControl_Construction) { |
| 26 | Model model; |
| 27 | |
| 28 | Construction construction(model); |
| 29 | |
| 30 | SimpleGlazing glazing(model); |
| 31 | EXPECT_TRUE(construction.insertLayer(0, glazing)); |
| 32 | |
| 33 | Blind blind(model); |
| 34 | EXPECT_TRUE(construction.insertLayer(1, blind)); |
| 35 | |
| 36 | ShadingControl shadingControl(construction); |
| 37 | ASSERT_TRUE(shadingControl.construction()); |
| 38 | EXPECT_EQ(construction.handle(), shadingControl.construction()->handle()); |
| 39 | EXPECT_FALSE(shadingControl.shadingMaterial()); |
| 40 | EXPECT_EQ("InteriorBlind", shadingControl.shadingType()); |
| 41 | EXPECT_TRUE(shadingControl.isTypeValueAllowingSlatAngleControl()); |
| 42 | EXPECT_EQ("OnIfHighSolarOnWindow", shadingControl.shadingControlType()); |
| 43 | EXPECT_FALSE(shadingControl.schedule()); |
| 44 | |
| 45 | std::vector<Point3d> vertices{ |
| 46 | {0, 0, 1}, |
| 47 | {0, 0, 0}, |
| 48 | {1, 0, 0}, |
| 49 | {1, 0, 1}, |
| 50 | }; |
| 51 | |
| 52 | SubSurface subSurface(vertices, model); |
| 53 | EXPECT_TRUE(subSurface.setConstruction(construction)); |
| 54 | EXPECT_FALSE(subSurface.shadingControl()); |
| 55 | EXPECT_TRUE(subSurface.setShadingControl(shadingControl)); |
| 56 | //ASSERT_TRUE(subSurface.shadingControl()); |
| 57 | //ASSERT_TRUE(subSurface.shadingControl()->construction()); |
| 58 | //EXPECT_EQ(construction.handle(), subSurface.shadingControl()->construction()->handle()); |
| 59 | } |
| 60 | |
| 61 | TEST_F(ModelFixture, ShadingControl_Material) { |
| 62 | Model model; |
nothing calls this directly
no test coverage detected