| 73 | } |
| 74 | |
| 75 | UNIT_CLASS_TEST(TestWithClassificator, Metadata_ValidateAndFormat_operator) |
| 76 | { |
| 77 | uint32_t const typeAtm = classif().GetTypeByPath({"amenity", "atm"}); |
| 78 | uint32_t const typeFuel = classif().GetTypeByPath({"amenity", "fuel"}); |
| 79 | uint32_t const typeCarSharing = classif().GetTypeByPath({"amenity", "car_sharing"}); |
| 80 | uint32_t const typeCarRental = classif().GetTypeByPath({"amenity", "car_rental"}); |
| 81 | |
| 82 | FeatureBuilderParams params; |
| 83 | MetadataTagProcessor p(params); |
| 84 | Metadata & md = params.GetMetadata(); |
| 85 | |
| 86 | // Ignore tag 'operator' if feature have inappropriate type. |
| 87 | p("operator", "Some"); |
| 88 | TEST(md.Empty(), ()); |
| 89 | |
| 90 | params.SetType(typeAtm); |
| 91 | p("operator", "Some1"); |
| 92 | TEST_EQUAL(md.Get(Metadata::FMD_OPERATOR), "Some1", ()); |
| 93 | |
| 94 | params.SetType(typeFuel); |
| 95 | p("operator", "Some2"); |
| 96 | TEST_EQUAL(md.Get(Metadata::FMD_OPERATOR), "Some2", ()); |
| 97 | |
| 98 | params.SetType(typeCarSharing); |
| 99 | params.AddType(typeCarRental); |
| 100 | p("operator", "Some3"); |
| 101 | TEST_EQUAL(md.Get(Metadata::FMD_OPERATOR), "Some3", ()); |
| 102 | } |
| 103 | |
| 104 | UNIT_TEST(Metadata_ValidateAndFormat_height) |
| 105 | { |
nothing calls this directly
no test coverage detected