| 27 | using namespace openstudio::model; |
| 28 | |
| 29 | TEST_F(ModelFixture, BuildingUnit_RenderingColor) { |
| 30 | |
| 31 | Model model; |
| 32 | BuildingUnit buildingUnit(model); |
| 33 | RenderingColor color1(model); |
| 34 | |
| 35 | color1.setRenderingRedValue(255); |
| 36 | color1.setRenderingGreenValue(0); |
| 37 | color1.setRenderingBlueValue(0); |
| 38 | color1.setRenderingAlphaValue(255); |
| 39 | |
| 40 | EXPECT_FALSE(buildingUnit.renderingColor()); |
| 41 | |
| 42 | ASSERT_TRUE(buildingUnit.setRenderingColor(color1)); |
| 43 | |
| 44 | boost::optional<RenderingColor> color2 = buildingUnit.renderingColor(); |
| 45 | ASSERT_TRUE(color2); |
| 46 | |
| 47 | EXPECT_EQ(color2->renderingRedValue(), 255); |
| 48 | EXPECT_EQ(color2->renderingGreenValue(), 0); |
| 49 | EXPECT_EQ(color2->renderingBlueValue(), 0); |
| 50 | EXPECT_EQ(color2->renderingAlphaValue(), 255); |
| 51 | |
| 52 | buildingUnit.resetRenderingColor(); |
| 53 | ASSERT_FALSE(buildingUnit.renderingColor()); |
| 54 | } |
| 55 | |
| 56 | TEST_F(ModelFixture, BuildingUnit_BuildingUnitType) { |
| 57 | Model model; |
nothing calls this directly
no test coverage detected