From ccdbeacc9974ce6d7aed508757519d5d87cdd309 Mon Sep 17 00:00:00 2001 From: Owen Reynolds Date: Thu, 19 Dec 2024 10:42:34 +0000 Subject: [PATCH] Corrected expected values for tests. Default behaviour for returning results for x.names (with no @ tag) and no language preference (list) is to return ALL. --- .../src/org/eclipse/epsilon/emc/rdf/RDFModelTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelTest.java b/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelTest.java index 191e0a3..ddbc636 100644 --- a/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelTest.java +++ b/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelTest.java @@ -79,21 +79,21 @@ public void getNamesWithoutPrefix() throws Exception { for (RDFModelElement o : model.allContents()) { names.addAll((Collection) pGetter.invoke(o, "name", context)); } - assertEquals(new HashSet<>(Arrays.asList(SPIDERMAN_NAME, GREEN_GOBLIN_NAME)), names); + assertEquals("With no language preference and no tag, all values return", ALL_NAMES, names);; } @Test public void getNamesWithPrefix() throws Exception { RDFResource res = (RDFResource) model.getElementById(SPIDERMAN_URI); Set names = new HashSet<>((Collection) pGetter.invoke(res, "foaf:name", context)); - assertEquals(Collections.singleton(SPIDERMAN_NAME), names); + assertEquals("With no language preference and no tag, all values return", SPIDERMAN_NAMES, names); } @Test public void getNamesWithDoubleColonPrefix() throws Exception { RDFResource res = (RDFResource) model.getElementById(SPIDERMAN_URI); Set names = new HashSet<>((Collection) pGetter.invoke(res, "foaf::name", context)); - assertEquals(Collections.singleton(SPIDERMAN_NAME), names); + assertEquals("With no language preference and no tag, all values return", SPIDERMAN_NAMES, names); } @Test @@ -103,7 +103,7 @@ public void getNameLiteralsWithPrefix() throws Exception { for (RDFLiteral l : (Collection) pGetter.invoke(res, "foaf:name_literal", context)) { names.add((String) l.getValue()); } - assertEquals(Collections.singleton(SPIDERMAN_NAME), names); + assertEquals("With no language preference and no tag, all values return", SPIDERMAN_NAMES, names); } @Test