use of org.apache.jena.assembler.Mode in project jena by apache.
the class TestAssemblerGroup method testPassesSelfIn.
public void testPassesSelfIn() {
final AssemblerGroup group = AssemblerGroup.create();
final Object result = new Object();
Assembler fake = new AssemblerBase() {
@Override
public Object open(Assembler a, Resource root, Mode irrelevant) {
assertSame("nested call should pass in assembler group:", group, a);
return result;
}
};
group.implementWith(JA.Object, fake);
assertSame(result, group.open(resourceInModel("x rdf:type ja:Object")));
}
use of org.apache.jena.assembler.Mode in project jena by apache.
the class TestMode method testConstantsExist.
public void testConstantsExist() {
Mode a = Mode.CREATE, b = Mode.DEFAULT;
Mode c = Mode.REUSE, d = Mode.ANY;
assertDiffer(Mode.CREATE, Mode.DEFAULT);
assertDiffer(Mode.CREATE, Mode.REUSE);
assertDiffer(Mode.CREATE, Mode.ANY);
assertDiffer(Mode.DEFAULT, Mode.REUSE);
assertDiffer(Mode.DEFAULT, Mode.ANY);
assertDiffer(Mode.REUSE, Mode.ANY);
}
Aggregations