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

Function TEST_F

src/model/test/SurfaceControlMovableInsulation_GTest.cpp:24–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22using namespace openstudio::model;
23
24TEST_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
56TEST_F(ModelFixture, SurfaceControlMovableInsulation_SetGetFields) {

Callers

nothing calls this directly

Calls 15

insulationTypeMethod · 0.80
setInsulationTypeMethod · 0.80
setMaterialMethod · 0.80
nameStringMethod · 0.80
lowerLimitValueMethod · 0.80
upperLimitValueMethod · 0.80
numericTypeMethod · 0.80
Point3dClass · 0.50
push_backMethod · 0.45
surfaceMethod · 0.45

Tested by

no test coverage detected