From 844e2889550197dd7e7ac7d65956176fa136977f Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Fri, 18 May 2018 10:52:48 +0200 Subject: [PATCH] Fix inverse constraint test for Wikidata extension. The inverse constraint on the part of property was removed. --- .../wikidata/qa/WikidataConstraintFetcherTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/WikidataConstraintFetcherTests.java b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/WikidataConstraintFetcherTests.java index 4058b42db..7f4df52a7 100644 --- a/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/WikidataConstraintFetcherTests.java +++ b/extensions/wikidata/tests/src/org/openrefine/wikidata/qa/WikidataConstraintFetcherTests.java @@ -43,6 +43,8 @@ public class WikidataConstraintFetcherTests { private PropertyIdValue partOf; private PropertyIdValue referenceURL; private PropertyIdValue reasonForDeprecation; + private PropertyIdValue mother; + private PropertyIdValue child; public WikidataConstraintFetcherTests() { fetcher = new WikidataConstraintFetcher(); @@ -55,6 +57,8 @@ public class WikidataConstraintFetcherTests { partOf = Datamodel.makeWikidataPropertyIdValue("P361"); referenceURL = Datamodel.makeWikidataPropertyIdValue("P854"); reasonForDeprecation = Datamodel.makeWikidataPropertyIdValue("P2241"); + mother = Datamodel.makeWikidataPropertyIdValue("P25"); + child = Datamodel.makeWikidataPropertyIdValue("P40"); } @Test @@ -70,7 +74,7 @@ public class WikidataConstraintFetcherTests { @Test public void testGetInverseConstraint() { - Assert.assertEquals(fetcher.getInversePid(partOf), hasPart); + Assert.assertEquals(fetcher.getInversePid(mother), child); } @Test