use of org.apache.openejb.config.PersistenceUnitLinkResolver in project tomee by apache.
the class PersistenceUnitLinkResolverTest method resolve.
@Test
public void resolve() {
final AppModule appModule = new AppModule(Thread.currentThread().getContextClassLoader(), "target/classes/foo", new Application(), false);
Files.mkdir(new File("target/classes/foo/bar"));
final PersistenceUnitLinkResolver resolver = new PersistenceUnitLinkResolver(appModule);
resolver.add(URI.create("file:/fake/1"), "foo", new PersistenceUnit());
resolver.add(URI.create("file:/fake/2"), "foo", new PersistenceUnit());
// can't resolve but doesn't fail
assertNull(resolver.resolveLink("foo", URI.create("bar")));
}
Aggregations