Search in sources :

Example 1 with MetadataRepository

use of org.jboss.jca.core.spi.mdr.MetadataRepository 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)

Example 2 with MetadataRepository

use of org.jboss.jca.core.spi.mdr.MetadataRepository 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 3 with MetadataRepository

use of org.jboss.jca.core.spi.mdr.MetadataRepository in project wildfly by wildfly.

the class PureTestCase method testMetadataConfiguration.

@Test
public void testMetadataConfiguration() throws Throwable {
    ServiceController<?> controller = serviceContainer.getService(ConnectorServices.IRONJACAMAR_MDR);
    assertNotNull(controller);
    MetadataRepository repository = (MetadataRepository) controller.getValue();
    assertNotNull(repository);
    Set<String> ids = repository.getResourceAdapters();
    assertNotNull(ids);
    for (String piId : ids) {
        assertNotNull(piId);
        assertNotNull(repository.getResourceAdapter(piId));
    }
}
Also used : MetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository) Test(org.junit.Test)

Example 4 with MetadataRepository

use of org.jboss.jca.core.spi.mdr.MetadataRepository in project wildfly by wildfly.

the class InflowFlatTestCase method testMetadataConfiguration.

/**
 * Tests metadata configuration
 *
 * @throws Throwable
 */
@Test
public void testMetadataConfiguration() throws Throwable {
    ServiceController<?> controller = serviceContainer.getService(ConnectorServices.IRONJACAMAR_MDR);
    assertNotNull(controller);
    MetadataRepository repository = (MetadataRepository) controller.getValue();
    assertNotNull(repository);
    Set<String> ids = repository.getResourceAdapters();
    assertNotNull(ids);
    String piId = getElementContaining(ids, "inflow2");
    assertNotNull(piId);
    assertNotNull(repository.getResourceAdapter(piId));
}
Also used : MetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository) Test(org.junit.Test)

Example 5 with MetadataRepository

use of org.jboss.jca.core.spi.mdr.MetadataRepository in project wildfly by wildfly.

the class PositiveValidationTestCase method testMetadataConfiguration.

@Test
public void testMetadataConfiguration() throws Throwable {
    ServiceController<?> controller = serviceContainer.getService(ConnectorServices.IRONJACAMAR_MDR);
    assertNotNull(controller);
    MetadataRepository repository = (MetadataRepository) controller.getValue();
    assertNotNull(repository);
    Set<String> ids = repository.getResourceAdapters();
    assertNotNull(ids);
    String piId = ids.iterator().next();
    assertNotNull(piId);
    assertNotNull(repository.getResourceAdapter(piId));
}
Also used : MetadataRepository(org.jboss.jca.core.spi.mdr.MetadataRepository) Test(org.junit.Test)

Aggregations

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