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

Function TEST_F

src/model/test/ShadingControl_GTest.cpp:25–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23using namespace openstudio::model;
24
25TEST_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
61TEST_F(ModelFixture, ShadingControl_Material) {
62 Model model;

Callers

nothing calls this directly

Calls 15

insertLayerMethod · 0.80
shadingMaterialMethod · 0.80
shadingTypeMethod · 0.80
setShadingControlMethod · 0.80
numberofSubSurfacesMethod · 0.80
addSubSurfaceMethod · 0.80
removeSubSurfaceMethod · 0.80
addSubSurfacesMethod · 0.80
removeAllSubSurfacesMethod · 0.80

Tested by

no test coverage detected