@EnableServices("http")
@WebResource("src/test/web")
@Classes public class ResourcesTest {
@Rule
public final ApplicationComposerRule container = new ApplicationComposerRule(this);
@RandomPort("http")
private URL context;
@Test
public void classloader() throws IOException { assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/foo.txt")).contains("from classloader"));
assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/other/foo.txt")).contains("from classloader2"));
}
@Test
public void folder() throws IOException { assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/bar.txt")).contains("from web"));
assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/sub/bar.txt")).contains("from web2"));
}
}