@Test public void testReadFromResourceThrowsExceptionOnUnknownPath() throws IOException { assertThrows(ODataJPAModelException.class, () -> { cut.readFromResource("annotations/Org.OData.Core.V2.xml", charset); }); }
public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset); CsdlDocument readFromURI(@Nonnull final URI uri); }
CsdlDocumentReader { public CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset) throws IOException, ODataJPAModelException { if (Objects.requireNonNull(path).isEmpty()) return null; return xmlMapper.readValue(loadXML(path, Objects.requireNonNull(charset)), CsdlDocument.class); } CsdlDocumentReader(); CsdlDocument readFromResource(@Nonnull final String path, @Nonnull final Charset charset); CsdlDocument readFromURI(@Nonnull final URI uri);  }