.registerOperation(myOperation, customHandler)
.registerOperation(myOperation, contentType, customHandler)
.setVerbose(true) .registerOperation(myOperation, customHandler)
@Test public void cfg_dataservice() { // Create a DataService and add the endpoint -> operation association. // This still needs the server to have the operation registered. DatasetGraph dsg = DatasetGraphFactory.createTxnMem(); DataService dataService = new DataService(dsg); FusekiBuilder.populateStdServices(dataService, true); FusekiBuilder.addServiceEP(dataService, newOp, endpointName); FusekiServer server = FusekiServer.create() .setPort(port) .registerOperation(newOp, contentType, customHandler) .add("/ds", dataService) .build(); testServer(server, true, true); }
@Test(expected=FusekiConfigException.class) public void cfg_bad_01() { FusekiServer.create() .setPort(port) .registerOperation(newOp, null, customHandler) .addOperation("/UNKNOWN", endpointName, newOp); //.build(); }
@Test public void cfg_builder_noCT() { FusekiServer server = FusekiServer.create() .setPort(port) .registerOperation(newOp, null, customHandler) .add("/ds", DatasetGraphFactory.createTxnMem(), true) .addOperation("/ds", endpointName, newOp) .build(); testServer(server, true, false); }
public void cfg_bad_ct_not_enabkled_here() { FusekiServer server = FusekiServer.create() .setPort(port) .registerOperation(newOp, "app/special", customHandler) .add("/ds", DatasetGraphFactory.createTxnMem(), true) // Unregistered. .addOperation("/ds", endpointName, newOp) .build(); testServer(server, false, false); }
@Test public void cfg_builder_CT() { FusekiServer server = FusekiServer.create() .setPort(port) .registerOperation(newOp, contentType, customHandler) .add("/ds", DatasetGraphFactory.createTxnMem(), true) .addOperation("/ds", endpointName, newOp) .build(); testServer(server, true, true); }