use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class AnnotatedFieldInjectionStatelessBean method lookupLongEntry.
public void lookupLongEntry() throws TestFailureException {
try {
final Long expected = new Long(1L);
Assert.assertNotNull("The Long looked up is null", loong);
Assert.assertEquals(expected, loong);
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class AnnotatedFieldInjectionStatelessBean method lookupBooleanEntry.
public void lookupBooleanEntry() throws TestFailureException {
try {
final Boolean expected = Boolean.TRUE;
Assert.assertNotNull("The Boolean looked up is null", booolean);
Assert.assertEquals(expected, booolean);
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class AnnotatedFieldInjectionStatelessBean method lookupByteEntry.
public void lookupByteEntry() throws TestFailureException {
try {
final Byte expected = new Byte((byte) 1);
Assert.assertNotNull("The Byte looked up is null", byyte);
Assert.assertEquals(expected, byyte);
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class AnnotatedFieldInjectionStatelessBean method lookupFloatEntry.
public void lookupFloatEntry() throws TestFailureException {
try {
final Float expected = new Float(1.0F);
Assert.assertNotNull("The Float looked up is null", flooat);
Assert.assertEquals(expected, flooat);
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.TestFailureException in project tomee by apache.
the class ContextLookupStatefulPojoBean method lookupPersistenceUnit.
public void lookupPersistenceUnit() throws TestFailureException {
try {
try {
final EntityManagerFactory emf = (EntityManagerFactory) ejbContext.lookup("persistence/TestUnit");
Assert.assertNotNull("The EntityManagerFactory is null", emf);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
Aggregations