use of org.apache.jena.rdf.model.test.helpers.RecordingModelListener in project jena by apache.
the class TestModelEvents method setUp.
@Override
public void setUp() {
super.setUp();
SL = new RecordingModelListener();
}
use of org.apache.jena.rdf.model.test.helpers.RecordingModelListener in project jena by apache.
the class TestReaderEvents method testReaderEvent.
public void testReaderEvent(final String language, final String emptyModel) {
final RecordingModelListener L = new RecordingModelListener();
model.register(L);
final RDFReader r = model.getReader(language);
final StringReader stringReader = new StringReader(emptyModel);
r.read(model, stringReader, "");
L.assertHasStart(new Object[] { "someEvent", model, GraphEvents.startRead });
L.assertHasEnd(new Object[] { "someEvent", model, GraphEvents.finishRead });
}
use of org.apache.jena.rdf.model.test.helpers.RecordingModelListener in project jena by apache.
the class TestModelEvents method testTwoListeners.
public void testTwoListeners() {
final Statement S = ModelHelper.statement(model, "S P O");
final RecordingModelListener SL1 = new RecordingModelListener();
final RecordingModelListener SL2 = new RecordingModelListener();
model.register(SL1).register(SL2);
model.add(S);
SL2.assertHas(new Object[] { "add", S });
SL1.assertHas(new Object[] { "add", S });
}
Aggregations