@Test public void testMoveWithExistedName() { long reqId = 7; String from = "/a/b/testMoveWithExistedName"; ms.putFile(from, file1); String to = pathToFile1; BinaryRawWriterEx message = createMessage(reqId, ModelStorateThinClientProcessor.PROCESSOR_ID, ModelStorateThinClientProcessor.Method.MOVE); message.writeString(from); message.writeString(to); ClientCustomQueryRequest req = new ClientCustomQueryRequest(toReader(message)); ClientResponse resp = req.process(connCtx); assertEquals(ClientStatus.FAILED, resp.status()); assertFalse(resp.error().isEmpty()); }
private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); @Override ClientResponse call(long requestId, byte methodId, BinaryRawReader reader); @Override String id(); }
ModelStorateThinClientProcessor implements CustomQueryProcessor { private ClientResponse error(long requestId, String msg) { return new ClientResponse(requestId, msg); } ModelStorateThinClientProcessor(ModelStorage modelStorage); @Override ClientResponse call(long requestId, byte methodId, BinaryRawReader reader); @Override String id(); static final String PROCESSOR_ID; }