use of org.apache.jena.assembler.assemblers.AssemblerGroup in project jena by apache.
the class TestAssemblerGroup method testCopyPreservesMapping.
public void testCopyPreservesMapping() {
AssemblerGroup initial = AssemblerGroup.create().implementWith(JA.InfModel, new InfModelAssembler());
AssemblerGroup copy = initial.copy();
assertSame(initial.assemblerFor(JA.InfModel), copy.assemblerFor(JA.InfModel));
}
use of org.apache.jena.assembler.assemblers.AssemblerGroup in project jena by apache.
the class TestAssemblerGroup method testEmptyAssemblerGroup.
public void testEmptyAssemblerGroup() {
AssemblerGroup a = AssemblerGroup.create();
assertInstanceOf(AssemblerGroup.class, a);
assertEquals(null, a.assemblerFor(resource("ja:Anything")));
checkFailsType(a, "rdf:Resource");
}
use of org.apache.jena.assembler.assemblers.AssemblerGroup in project jena by apache.
the class TestAssemblerGroup method testBuiltinGroup.
public void testBuiltinGroup() {
AssemblerGroup g = Assembler.general;
assertInstanceOf(Model.class, g.open(resourceInModel("x rdf:type ja:DefaultModel")));
assertInstanceOf(InfModel.class, g.open(resourceInModel("x rdf:type ja:InfModel")));
assertMemoryModel(g.open(resourceInModel("x rdf:type ja:MemoryModel")));
}
use of org.apache.jena.assembler.assemblers.AssemblerGroup in project jena by apache.
the class TestAssemblerGroup method testMultipleAssemblerGroup.
public void testMultipleAssemblerGroup() {
AssemblerGroup a = AssemblerGroup.create();
assertSame(a, a.implementWith(JA.InfModel, Assembler.infModel));
assertSame(a, a.implementWith(JA.MemoryModel, Assembler.memoryModel));
assertInstanceOf(InfModel.class, a.openModel(resourceInModel("x rdf:type ja:InfModel")));
assertFalse(a.openModel(resourceInModel("y rdf:type ja:MemoryModel")) instanceof InfModel);
checkFailsType(a, "js:DefaultModel");
}
Aggregations