use of fr.lirmm.graphik.graal.api.core.Ontology in project graal by graphik-team.
the class DefaultOntologyTest method testGetRuleNames_empty.
// /////////////////////////////////////////////////////////////////////////
// EMPTY ONTO CASE
// /////////////////////////////////////////////////////////////////////////
/**
* Test method for
* {@link fr.lirmm.graphik.graal.core.ruleset.DefaultOntology#getRuleNames()}.
*/
@Test
public void testGetRuleNames_empty() {
// given
Ontology onto = new DefaultOntology();
// when
Set<String> ruleNames = onto.getRuleNames();
// then
Assert.assertTrue(ruleNames.isEmpty());
}
use of fr.lirmm.graphik.graal.api.core.Ontology in project graal by graphik-team.
the class DefaultOntologyTest method testSize_empty.
/**
* Test method for
* {@link fr.lirmm.graphik.graal.core.ruleset.DefaultOntology#size()}.
*/
@Test
public void testSize_empty() {
// given
Ontology onto = new DefaultOntology();
// when
int size = onto.size();
// then
Assert.assertEquals(0, size);
}
use of fr.lirmm.graphik.graal.api.core.Ontology in project graal by graphik-team.
the class DefaultOntologyTest method testAddDifferentRulesWithSameName.
/**
* Test method for
* {@link fr.lirmm.graphik.graal.core.ruleset.DefaultOntology#add(Rule)}.
*/
@Test
public void testAddDifferentRulesWithSameName() {
// given
Ontology onto = new DefaultOntology();
// when
onto.add(same1);
onto.add(same2);
// then
Assert.assertEquals(2, onto.size());
}
Aggregations