Package org.openengsb.core.persistence.test.objects

Examples of org.openengsb.core.persistence.test.objects.A


    }

    @Test
    public void testPersistingAndLoadingVariousObject_shouldWork() throws Exception {
        persistenceService.create(new B());
        persistenceService.create(new A());
        List<A> query = persistenceService.query(new A());
        assertEquals(2, query.size());
    }
View Full Code Here


    }

    @Test
    public void testQueryBySample_shouldReturnCorrectObject() throws Exception {
        persistenceService.create(new B("other"));
        persistenceService.create(new A("blub"));
        List<A> query = persistenceService.query(new A("blub"));
        assertEquals(1, query.size());
    }
View Full Code Here

        assertEquals(1, query.size());
    }

    @Test
    public void testPersistingAndLoadingVariousMultibleObjects() throws Exception {
        persistenceService.create(Lists.newArrayList(new B(), new A()));
        List<B> query = persistenceService.query(new B());
        assertEquals(1, query.size());
    }
View Full Code Here

        assertEquals(1, query.size());
    }

    @Test
    public void testUpdatingAndRetrievingUpdatedObjects_shouldReturnUpdatedObjects() throws Exception {
        persistenceService.create(Lists.newArrayList(new B(), new A()));
        List<B> query = persistenceService.query(new B("blub"));
        assertEquals(0, query.size());
        persistenceService.update(new B(), new B("blub"));
        query = persistenceService.query(new B("blub"));
        assertEquals(1, query.size());
View Full Code Here

        assertEquals(1, query.size());
    }

    @Test
    public void testDeleteObject_shouldRemoveItFromDatabase() throws Exception {
        persistenceService.create(Lists.newArrayList(new B("blub"), new A()));
        List<B> query = persistenceService.query(new B("blub"));
        assertEquals(1, query.size());
        persistenceService.delete(new B("blub"));
        query = persistenceService.query(new B("blub"));
        assertEquals(0, query.size());
View Full Code Here

TOP

Related Classes of org.openengsb.core.persistence.test.objects.A

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.