use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupBmpBean method lookupStringEntry.
public void lookupStringEntry() throws TestFailureException {
try {
try {
final String expected = new String("1");
final String actual = (String) ejbContext.lookup("entity/bmp/references/String");
Assert.assertNotNull("The String looked up is null", actual);
Assert.assertEquals(expected, actual);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupBmpBean method lookupEntityBean.
//
// Home interface methods
// =============================
// =============================
// Remote interface methods
//
public void lookupEntityBean() throws TestFailureException {
try {
try {
final BasicBmpHome home = (BasicBmpHome) ejbContext.lookup("entity/bmp/beanReferences/bmp_entity");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicBmpObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupBmpBean method lookupLongEntry.
public void lookupLongEntry() throws TestFailureException {
try {
try {
final Long expected = new Long(1L);
final Long actual = (Long) ejbContext.lookup("entity/bmp/references/Long");
Assert.assertNotNull("The Long looked up is null", actual);
Assert.assertEquals(expected, actual);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupBmpBean method lookupBooleanEntry.
public void lookupBooleanEntry() throws TestFailureException {
try {
try {
final Boolean expected = Boolean.TRUE;
final Boolean actual = (Boolean) ejbContext.lookup("entity/bmp/references/Boolean");
Assert.assertNotNull("The Boolean looked up is null", actual);
Assert.assertEquals(expected, actual);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupBmpBean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("entity/bmp/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
Aggregations