/** * Read the classpath resource with the given name and return its contents as a string. Hook to * for reading in classpath resources for subsequent parsing. The resource is loaded using similar * semantics to {@link Class#getResource(String)} * * @param name the name of the resource * @return the contents of the resource as a string * @throws IOException */ protected String readResource(final String name) throws IOException { return ModelTestUtils.readResource(getClass(), name); }
/** * Read the classpath resource with the given name and return its contents as a string. Hook to * for reading in classpath resources for subsequent parsing. The resource is loaded using similar * semantics to {@link Class#getResource(String)} * * @param name the name of the resource * @return the contents of the resource as a string * @throws IOException */ protected String readResource(final String name) throws IOException { return ModelTestUtils.readResource(getClass(), name); }
/** * Read the classpath resource with the given name and return its contents as a string. Hook to * for reading in classpath resources for subsequent parsing. The resource is loaded using similar * semantics to {@link Class#getResource(String)} * * @param name the name of the resource * @return the contents of the resource as a string * @throws IOException */ protected String readResource(final String name) throws IOException { return ModelTestUtils.readResource(getClass(), name); }
public ModelTestBootOperationsBuilder setXmlResource(String resource) throws IOException, XMLStreamException { validateNotAlreadyBuilt(); validateSubsystemConfig(); this.subsystemXmlResource = resource; internalSetSubsystemXml(ModelTestUtils.readResource(testClass, resource)); return this; }