Skip to content

Commit

Permalink
EN preference not available should return all (not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenR-York committed Dec 19, 2024
1 parent 2005a7b commit 20d3cd1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ public void getNamesWithoutPrefixUsingPreferredLanguageTagEN() throws Exception
setupModel(LANGUAGE_PREFERENCE_EN_STRING);
RDFResource res = (RDFResource) model.getElementById(SPIDERMAN_URI);
Set<String> names = new HashSet<>((Collection<String>) pGetter.invoke(res, "name", context));
assertEquals(Collections.singleton(SPIDERMAN_NAME), names);
assertEquals("Should return all when language preference cant be matched",SPIDERMAN_NAMES, names);
}

@Test
public void getNamesWithPrefixUsingPreferredLanguageTagEN() throws Exception {
setupModel(LANGUAGE_PREFERENCE_EN_STRING);
RDFResource res = (RDFResource) model.getElementById(SPIDERMAN_URI);
Set<String> names = new HashSet<>((Collection<String>) pGetter.invoke(res, "foaf:name", context));
assertEquals(Collections.singleton(SPIDERMAN_NAME), names);
assertEquals("Should return all when language preference cant be matched",SPIDERMAN_NAMES, names);
}

@Test
Expand All @@ -153,7 +153,7 @@ public void getNameLiteralWithPrefixUsingPreferredLanguageTagEN() throws Excepti
for (RDFLiteral l : (Collection<RDFLiteral>) pGetter.invoke(res, "foaf:name_literal", context)) {
names.add((String) l.getValue());
}
assertEquals(Collections.singleton(SPIDERMAN_NAME), names);
assertEquals("Should return all when language preference cant be matched",SPIDERMAN_NAMES, names);
}

@Test
Expand All @@ -164,7 +164,7 @@ public void getNameLiteralWithoutPrefixUsingPreferredLanguageTagEN() throws Exce
for (RDFLiteral l : (Collection<RDFLiteral>) pGetter.invoke(res, "name_literal", context)) {
names.add((String) l.getValue());
}
assertEquals(Collections.singleton(SPIDERMAN_NAME), names);
assertEquals("Should return all when language preference cant be matched",SPIDERMAN_NAMES, names);
}


Expand Down

0 comments on commit 20d3cd1

Please sign in to comment.