import java.io.InputStream;
import java.net.URI;
import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Collection;
import javax.ws.rs.core.MediaType;
import org.junit.BeforeClass;
import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
private static QNameModule initializeInstanceIdentifierModule() {
try {
return QNameModule.create(URI.create("instance:identifier:module"),
- new SimpleDateFormat("yyyy-MM-dd").parse("2014-01-17"));
+ SimpleDateFormatUtil.getRevisionFormat().parse("2014-01-17"));
} catch (final ParseException e) {
throw new Error(e);
}
throws NoSuchFieldException, SecurityException, FileNotFoundException, SourceException, ReactorException {
final Collection<File> testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang");
testFiles.addAll(TestRestconfUtils.loadFiles("/modules"));
- testFiles.addAll(TestRestconfUtils.loadFiles("/invoke-rpc"));
schemaContext = YangParserTestUtils.parseYangSources(testFiles);
controllerContext.setSchemas(schemaContext);
when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue, dataII);
}
- private void checkExpectValueNormalizeNodeContext(final DataSchemaNode dataSchemaNode,
+ private static void checkExpectValueNormalizeNodeContext(final DataSchemaNode dataSchemaNode,
final NormalizedNodeContext nnContext, final YangInstanceIdentifier dataNodeIdent) {
assertEquals(dataSchemaNode, nnContext.getInstanceIdentifierContext().getSchemaNode());
assertEquals(dataNodeIdent, nnContext.getInstanceIdentifierContext().getInstanceIdentifier());
assertNotNull(NormalizedNodes.findNode(nnContext.getData(), dataNodeIdent));
}
-}
\ No newline at end of file
+}