Bug 3866: Support for Restconf HTTP Patch
[netconf.git] / opendaylight / restconf / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / rest / impl / test / providers / AbstractBodyReaderTest.java
index f9a31955a59986ec533ce69ab18fb13bb1a7205c..6a728dc40c3055ceac51328eb4d40a68a886f54f 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -26,6 +26,7 @@ import org.opendaylight.netconf.sal.rest.api.RestconfConstants;
 import org.opendaylight.netconf.sal.rest.impl.AbstractIdentifierAwareJaxRsProvider;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
+import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
@@ -100,4 +101,11 @@ public abstract class AbstractBodyReaderTest {
                 .getSchemaContext());
         assertNotNull(nnContext.getInstanceIdentifierContext().getSchemaNode());
     }
+
+    protected static void checkPATCHContext(final PATCHContext patchContext) {
+        assertNotNull(patchContext.getData());
+        assertNotNull(patchContext.getInstanceIdentifierContext().getInstanceIdentifier());
+        assertNotNull(patchContext.getInstanceIdentifierContext().getSchemaContext());
+        assertNotNull(patchContext.getInstanceIdentifierContext().getSchemaNode());
+    }
 }