* 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.rest.impl.test.providers;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import org.junit.BeforeClass;
import org.junit.Test;
import org.opendaylight.netconf.sal.rest.impl.JsonToPatchBodyReader;
-import org.opendaylight.netconf.sal.restconf.impl.PatchContext;
-import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
+import org.opendaylight.restconf.common.patch.PatchContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
public class TestJsonPatchBodyReader extends AbstractBodyReaderTest {
private final JsonToPatchBodyReader jsonToPatchBodyReader;
- private static SchemaContext schemaContext;
+ private static EffectiveModelContext schemaContext;
- public TestJsonPatchBodyReader() throws NoSuchFieldException, SecurityException {
- super();
- jsonToPatchBodyReader = new JsonToPatchBodyReader();
+ public TestJsonPatchBodyReader() {
+ super(schemaContext, null);
+ jsonToPatchBodyReader = new JsonToPatchBodyReader(controllerContext);
}
@Override
@BeforeClass
public static void initialization() {
schemaContext = schemaContextLoader("/instanceidentifier/yang", schemaContext);
- CONTROLLER_CONTEXT.setSchemas(schemaContext);
}
@Test