Search in sources :

Example 1 with ConnectorImpl

use of org.jboss.jca.common.metadata.spec.ConnectorImpl in project wildfly by wildfly.

the class NoRaAnnoTestCase method testMetaData.

/**
     * Test metadata
     *
     * @throws Throwable Thrown if case of an error
     */
@Test
public void testMetaData() throws Throwable {
    ServiceController<?> controller = serviceContainer.getService(ConnectorServices.IRONJACAMAR_MDR);
    assertNotNull(controller);
    MetadataRepository mdr = (MetadataRepository) controller.getValue();
    assertNotNull(mdr);
    Set<String> ids = mdr.getResourceAdapters();
    assertNotNull(ids);
    assertTrue(ids.size() > 0);
    String piId = getElementContaining(ids, "ra16anno");
    assertNotNull(mdr.getResourceAdapter(piId));
    assertTrue(mdr.getResourceAdapter(piId) instanceof ConnectorImpl);
}
Also used : MetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository) ConnectorImpl(org.jboss.jca.common.metadata.spec.ConnectorImpl) Test(org.junit.Test)

Example 2 with ConnectorImpl

use of org.jboss.jca.common.metadata.spec.ConnectorImpl in project wildfly by wildfly.

the class RaAnnoTestCase method testMetaData.

/**
     * Test metadata
     *
     * @throws Throwable Thrown if case of an error
     */
@Test
public void testMetaData() throws Throwable {
    ServiceController<?> controller = serviceContainer.getService(ConnectorServices.IRONJACAMAR_MDR);
    assertNotNull(controller);
    MetadataRepository mdr = (MetadataRepository) controller.getValue();
    assertNotNull(mdr);
    Set<String> ids = mdr.getResourceAdapters();
    assertNotNull(ids);
    assertTrue(ids.size() > 0);
    String piId = getElementContaining(ids, "ra16anno");
    assertNotNull(mdr.getResourceAdapter(piId));
    assertTrue(mdr.getResourceAdapter(piId) instanceof ConnectorImpl);
}
Also used : MetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository) ConnectorImpl(org.jboss.jca.common.metadata.spec.ConnectorImpl) Test(org.junit.Test)

Aggregations

ConnectorImpl (org.jboss.jca.common.metadata.spec.ConnectorImpl)2 MetadataRepository (org.jboss.jca.core.spi.mdr.MetadataRepository)2 Test (org.junit.Test)2