- public void putDatastoreDataViaUrlTest200() throws UnsupportedEncodingException {
- mockCommitConfigurationDataPutMethod(TransactionStatus.COMMITED);
- putDataViaUrlTest("/datastore/", Draft01.MediaTypes.DATA + JSON, jsonData, 200);
- putDataViaUrlTest("/datastore/", Draft01.MediaTypes.DATA + XML, xmlData, 200);
- putDataViaUrlTest("/datastore/", MediaType.APPLICATION_JSON, jsonData, 200);
- putDataViaUrlTest("/datastore/", MediaType.APPLICATION_XML, xmlData, 200);
- putDataViaUrlTest("/datastore/", MediaType.TEXT_XML, xmlData, 200);
- }
-
- /**
- * Test method
- * {@link RestconfImpl#updateConfigurationData(String, CompositeNode)} of
- * RestconfImpl for "/datastore/...identifier..." URL. Return status code is
- * 500.
- *
- */
- @Test
- public void putDatastoreDataViaUrlTest500() throws UnsupportedEncodingException {
- mockCommitConfigurationDataPutMethod(TransactionStatus.FAILED);
- putDataViaUrlTest("/datastore/", Draft01.MediaTypes.DATA + JSON, jsonData, 500);
- putDataViaUrlTest("/datastore/", Draft01.MediaTypes.DATA + XML, xmlData, 500);
- putDataViaUrlTest("/datastore/", MediaType.APPLICATION_JSON, jsonData, 500);
- putDataViaUrlTest("/datastore/", MediaType.APPLICATION_XML, xmlData, 500);
- putDataViaUrlTest("/datastore/", MediaType.TEXT_XML, xmlData, 500);
+ public void putConfigStatusCodesEmptyBody() throws UnsupportedEncodingException {
+ String uri = "/config/ietf-interfaces:interfaces/interface/eth0";
+ Response resp = target(uri).request(MediaType.APPLICATION_JSON).put(
+ Entity.entity("", MediaType.APPLICATION_JSON));
+ assertEquals(400, put(uri, MediaType.APPLICATION_JSON, ""));