218506300d2e15530e20d6e976567d8fccc01a27
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / nb / rfc8040 / jersey / providers / patch / AbstractPatchBodyReaderTest.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.restconf.nb.rfc8040.jersey.providers.patch;
9
10 import static org.junit.Assert.assertNotNull;
11
12 import org.opendaylight.restconf.common.patch.PatchContext;
13 import org.opendaylight.restconf.nb.rfc8040.jersey.providers.test.AbstractBodyReaderTest;
14
15 abstract class AbstractPatchBodyReaderTest extends AbstractBodyReaderTest {
16
17     static final void checkPatchContext(final PatchContext patchContext) {
18         assertNotNull(patchContext.getData());
19
20         final var iid = patchContext.getInstanceIdentifierContext();
21         assertNotNull(iid);
22
23         assertNotNull(iid.getInstanceIdentifier());
24         assertNotNull(iid.getSchemaContext());
25         assertNotNull(iid.getSchemaNode());
26     }
27
28     static final void checkPatchContextMountPoint(final PatchContext patchContext) {
29         checkPatchContext(patchContext);
30         assertNotNull(patchContext.getInstanceIdentifierContext().getMountPoint());
31     }
32 }