| 43 | } |
| 44 | |
| 45 | TEST_F(ModelFixture, ModelMerger_Initial_Empty) { |
| 46 | |
| 47 | Model model1; |
| 48 | Model model2; |
| 49 | std::map<UUID, UUID> handleMapping; |
| 50 | |
| 51 | std::string siteName = "The Site"; |
| 52 | std::string facilityName = "The Facility"; |
| 53 | std::string buildingName = "The Building"; |
| 54 | double northAxis = 30; |
| 55 | double latitude = 40; |
| 56 | double longitude = -104; |
| 57 | double elevation = 5280; |
| 58 | |
| 59 | // first model is empty |
| 60 | |
| 61 | // second model has spaces |
| 62 | Site site2 = model2.getUniqueModelObject<Site>(); |
| 63 | site2.setName(siteName); |
| 64 | site2.setLatitude(latitude); |
| 65 | site2.setLongitude(longitude); |
| 66 | site2.setElevation(elevation); |
| 67 | |
| 68 | auto facility2 = model2.getUniqueModelObject<Facility>(); |
| 69 | facility2.setName(facilityName); |
| 70 | |
| 71 | Building building2 = model2.getUniqueModelObject<Building>(); |
| 72 | building2.setName(buildingName); |
| 73 | building2.setNorthAxis(northAxis); |
| 74 | |
| 75 | // object#_model# |
| 76 | std::vector<Point3d> floorprint1_2{ |
| 77 | {0, 10, 0}, |
| 78 | {10, 10, 0}, |
| 79 | {10, 0, 0}, |
| 80 | {0, 0, 0}, |
| 81 | }; |
| 82 | |
| 83 | std::vector<Point3d> floorprint2_2{ |
| 84 | {0, 5, 0}, |
| 85 | {5, 5, 0}, |
| 86 | {5, 0, 0}, |
| 87 | {0, 0, 0}, |
| 88 | }; |
| 89 | |
| 90 | boost::optional<Space> space1_2 = Space::fromFloorPrint(floorprint1_2, 3, model2); |
| 91 | ASSERT_TRUE(space1_2); |
| 92 | space1_2->setName("Space 1 - Model 2"); |
| 93 | EXPECT_EQ(6u, space1_2->surfaces().size()); |
| 94 | EXPECT_EQ(4u, setWWR(*space1_2, 0.3)); |
| 95 | |
| 96 | boost::optional<Space> space2_2 = Space::fromFloorPrint(floorprint2_2, 3, model2); |
| 97 | ASSERT_TRUE(space2_2); |
| 98 | space2_2->setName("Space 2 - Model 2"); |
| 99 | EXPECT_EQ(6u, space2_2->surfaces().size()); |
| 100 | EXPECT_EQ(4u, setWWR(*space2_2, 0.3)); |
| 101 | |
| 102 | ThermalZone zone1_2(model2); |
nothing calls this directly
no test coverage detected