X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FMediaTypesTest.java;h=e1d7e6a62447d3b1145c4bb672267ec77e4fc762;hp=bbedd2b42b5093dbf70e6011e94218689debbfd7;hb=6fd408a04fe4a3611843e2246ece6d7c34b76903;hpb=91d7c1ee52322acad08e9f81228ac36b3aa684f5 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MediaTypesTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MediaTypesTest.java index bbedd2b42b..e1d7e6a624 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MediaTypesTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MediaTypesTest.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl.test; import static org.mockito.Matchers.any; @@ -65,9 +72,9 @@ public class MediaTypesTest extends JerseyTest { String uriPath = "ietf-interfaces:interfaces"; String uri = createUri(uriPrefix, uriPath); when(restconfService.invokeRpc(eq(uriPath), any(CompositeNode.class))).thenReturn(null); - post(uri, Draft02.MediaTypes.DATA+JSON, Draft02.MediaTypes.DATA+JSON, jsonData); + post(uri, Draft02.MediaTypes.OPERATION+JSON, Draft02.MediaTypes.OPERATION+JSON, jsonData); verify(restconfService, times(1)).invokeRpc(eq(uriPath), any(CompositeNode.class)); - post(uri, Draft02.MediaTypes.DATA+XML, Draft02.MediaTypes.DATA+XML, xmlData); + post(uri, Draft02.MediaTypes.OPERATION+XML, Draft02.MediaTypes.OPERATION+XML, xmlData); verify(restconfService, times(2)).invokeRpc(eq(uriPath), any(CompositeNode.class)); post(uri, MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON, jsonData); verify(restconfService, times(3)).invokeRpc(eq(uriPath), any(CompositeNode.class));