Package org.apache.onami.persist.test

Examples of org.apache.onami.persist.test.TestEntity


    @Override
    @Transactional( rollbackOn = TestException.class )
    public void doTransactional()
        throws TestException, RuntimeTestException
    {
        storeEntity( new TestEntity() );
        doOtherTasks();
        throw new RuntimeTestException( getClass().getSimpleName() );
    }
View Full Code Here


    @Override
    @Transactional( ignore = Exception.class )
    public void doTransactional()
        throws TestException, RuntimeTestException
    {
        storeEntity( new TestEntity() );
        doOtherTasks();
    }
View Full Code Here

    @Before
    public void setUp()
    {
        super.setUp();

        firstEntity = new TestEntity();
        secondEntity = new TestEntity();
    }
View Full Code Here

    @Test
    public void storeUnitsInTwoPersistenceUnits()
        throws Exception
    {
        // given
        final TestEntity firstEntity = new TestEntity();
        final TestEntity secondEntity = new TestEntity();

        // when
        firstEmp.get().persist( firstEntity );
        secondEmp.get().persist( secondEntity );

        // then
        assertNotNull( firstEmp.get().find( TestEntity.class, firstEntity.getId() ) );
        assertNotNull( secondEmp.get().find( TestEntity.class, secondEntity.getId() ) );
        assertNull( firstEmp.get().find( TestEntity.class, secondEntity.getId() ) );
        assertNull( secondEmp.get().find( TestEntity.class, firstEntity.getId() ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.onami.persist.test.TestEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.