Package com.springsource.insight.plugin.springdata.model

Examples of com.springsource.insight.plugin.springdata.model.TestEntity


    }

    public void testEntityRepository(TestEntityRepository repository) {
        Date startTime = new Date(System.currentTimeMillis()), endTime = new Date(startTime.getTime());
        for (int index = 0; index < NUM_ENTITIES; index++) {
            TestEntity entity = repository.save(new TestEntity(endTime));
            assertNotNull("No entity created for " + endTime, entity);
            assertInvokedMethodOperation("save", entity, entity);

            Long id = entity.getId();
            assertNotNull("No ID assigned to " + entity, id);

            boolean exists = repository.exists(id);
            assertTrue("Entity does not exist " + entity, exists);
            assertInvokedMethodOperation("exists", Boolean.valueOf(exists), id);
View Full Code Here


        }

        int count = 0;
        for (TestEntity expEntity : list) {
            Long id = expEntity.getId();
            TestEntity actEntity = repository.findOne(id);
            assertNotNull("[" + name + "]: Cannot locate ID=" + id, actEntity);
            assertEquals("[" + name + "]: Mismatced values for ID=" + id, expEntity, actEntity);
            assertInvokedMethodOperation("findOne", actEntity, id);

            count++;
View Full Code Here

TOP

Related Classes of com.springsource.insight.plugin.springdata.model.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.