use of org.apache.stanbol.entityhub.servicesapi.model.Representation in project stanbol by apache.
the class RepresentationTest method testGetNaturalTextWithLanguagesWithoutValues.
@Test
public void testGetNaturalTextWithLanguagesWithoutValues() {
String field = "urn:the.field:used.for.this.Test";
Representation rep = initNaturalLanguageTest(field);
// test not present language
Iterator<Text> esTexts = rep.get(field, "es");
assertNotNull(esTexts);
assertFalse(esTexts.hasNext());
// test multiple not present languages
Iterator<Text> frItTexts = rep.get(field, "fr", "it");
assertNotNull(frItTexts);
assertFalse(frItTexts.hasNext());
}
use of org.apache.stanbol.entityhub.servicesapi.model.Representation in project stanbol by apache.
the class RepresentationTest method testNullFieldGet.
@Test(expected = IllegalArgumentException.class)
public void testNullFieldGet() {
Representation rep = createRepresentation(null);
rep.get(null);
}
use of org.apache.stanbol.entityhub.servicesapi.model.Representation in project stanbol by apache.
the class RepresentationTest method testEmptyFieldRemoveNaturalText.
@Test(expected = IllegalArgumentException.class)
public void testEmptyFieldRemoveNaturalText() {
Representation rep = createRepresentation(null);
rep.removeNaturalText("", "test");
}
use of org.apache.stanbol.entityhub.servicesapi.model.Representation in project stanbol by apache.
the class RepresentationTest method testEmptyFieldGet.
@Test(expected = IllegalArgumentException.class)
public void testEmptyFieldGet() {
Representation rep = createRepresentation(null);
rep.get("");
}
use of org.apache.stanbol.entityhub.servicesapi.model.Representation in project stanbol by apache.
the class RepresentationTest method testNullFieldRemoveReference.
@Test(expected = IllegalArgumentException.class)
public void testNullFieldRemoveReference() {
Representation rep = createRepresentation(null);
rep.removeReference(null, "urn:test");
}
Aggregations