# Test Cases for Geographic Restriction Validation # # This file contains test instances for validating geographic restrictions # on FeatureTypeEnum. # # Test scenarios: # 1. Valid country restriction (BUITENPLAATS in Netherlands) # 2. Invalid country restriction (BUITENPLAATS in Germany) # 3. Valid subregion restriction (SACRED_SHRINE_BALI in Indonesia/Bali) # 4. Invalid subregion restriction (SACRED_SHRINE_BALI in Indonesia/Java) # 5. No feature type (should pass - nothing to validate) # 6. Feature type without restrictions (should pass - no restrictions) --- # Test 1: ✅ Valid - BUITENPLAATS in Netherlands - place_name: "Hofwijck" place_language: "nl" place_specificity: BUILDING country: alpha_2: "NL" alpha_3: "NLD" has_feature_type: feature_type: BUITENPLAATS feature_name: "Hofwijck buitenplaats" feature_description: "17th century country estate" refers_to_custodian: "https://nde.nl/ontology/hc/nl-zh-vrl-m-hofwijck" # Test 2: ❌ Invalid - BUITENPLAATS in Germany (should fail) - place_name: "Schloss Charlottenburg" place_language: "de" place_specificity: BUILDING country: alpha_2: "DE" alpha_3: "DEU" has_feature_type: feature_type: BUITENPLAATS # ← ERROR: BUITENPLAATS requires NL, but place is in DE feature_name: "Charlottenburg Palace" feature_description: "Baroque palace in Berlin" refers_to_custodian: "https://nde.nl/ontology/hc/de-be-ber-m-charlottenburg" # Test 3: ✅ Valid - SACRED_SHRINE_BALI in Indonesia/Bali - place_name: "Pura Besakih" place_language: "id" place_specificity: BUILDING country: alpha_2: "ID" alpha_3: "IDN" subregion: iso_3166_2_code: "ID-BA" subdivision_name: "Bali" has_feature_type: feature_type: SACRED_SHRINE_BALI feature_name: "Pura Besakih" feature_description: "Mother Temple of Besakih" refers_to_custodian: "https://nde.nl/ontology/hc/id-ba-kar-h-besakih" # Test 4: ❌ Invalid - SACRED_SHRINE_BALI in Indonesia/Java (should fail) - place_name: "Borobudur Temple" place_language: "id" place_specificity: BUILDING country: alpha_2: "ID" alpha_3: "IDN" subregion: iso_3166_2_code: "ID-JT" # ← Central Java, not Bali subdivision_name: "Jawa Tengah" has_feature_type: feature_type: SACRED_SHRINE_BALI # ← ERROR: Requires ID-BA, but place is in ID-JT feature_name: "Borobudur" feature_description: "Buddhist temple complex" refers_to_custodian: "https://nde.nl/ontology/hc/id-jt-mag-h-borobudur" # Test 5: ✅ Valid - No feature type (nothing to validate) - place_name: "Museum Het Rembrandthuis" place_language: "nl" place_specificity: BUILDING country: alpha_2: "NL" alpha_3: "NLD" # No has_feature_type field → No validation required refers_to_custodian: "https://nde.nl/ontology/hc/nl-nh-ams-m-rembrandthuis" # Test 6: ✅ Valid - Feature type without geographic restrictions - place_name: "Centraal Museum" place_language: "nl" place_specificity: BUILDING country: alpha_2: "NL" alpha_3: "NLD" has_feature_type: feature_type: MUSEUM # ← No geographic restrictions (globally applicable) feature_name: "Centraal Museum building" feature_description: "City museum of Utrecht" refers_to_custodian: "https://nde.nl/ontology/hc/nl-ut-utr-m-centraal" # Test 7: ❌ Invalid - Missing country when feature type requires it - place_name: "Rijksmonument Buitenplaats" place_language: "nl" place_specificity: BUILDING # Missing country field! has_feature_type: feature_type: BUITENPLAATS # ← ERROR: BUITENPLAATS requires country=NL, but no country specified feature_name: "Unknown buitenplaats" refers_to_custodian: "https://nde.nl/ontology/hc/unknown" # Test 8: ❌ Invalid - CULTURAL_HERITAGE_OF_PERU in Chile - place_name: "Museo Chileno de Arte Precolombino" place_language: "es" place_specificity: BUILDING country: alpha_2: "CL" alpha_3: "CHL" has_feature_type: feature_type: CULTURAL_HERITAGE_OF_PERU # ← ERROR: Requires PE, but place is in CL feature_name: "Chilean Pre-Columbian Art Museum" refers_to_custodian: "https://nde.nl/ontology/hc/cl-rm-san-m-precolombino" # Test 9: ✅ Valid - CITY_OF_PITTSBURGH_HISTORIC_DESIGNATION in USA - place_name: "Carnegie Library of Pittsburgh" place_language: "en" place_specificity: BUILDING country: alpha_2: "US" alpha_3: "USA" subregion: iso_3166_2_code: "US-PA" subdivision_name: "Pennsylvania" settlement: geonames_id: 5206379 settlement_name: "Pittsburgh" has_feature_type: feature_type: CITY_OF_PITTSBURGH_HISTORIC_DESIGNATION feature_name: "Carnegie Library Main Branch" feature_description: "Historic Carnegie library building" refers_to_custodian: "https://nde.nl/ontology/hc/us-pa-pit-l-carnegie" # Test 10: ❌ Invalid - CITY_OF_PITTSBURGH_HISTORIC_DESIGNATION in Canada - place_name: "Carnegie Library of Ottawa" place_language: "en" place_specificity: BUILDING country: alpha_2: "CA" alpha_3: "CAN" has_feature_type: feature_type: CITY_OF_PITTSBURGH_HISTORIC_DESIGNATION # ← ERROR: Requires US, but place is in CA feature_name: "Carnegie Library building" refers_to_custodian: "https://nde.nl/ontology/hc/ca-on-ott-l-carnegie"