Examples of TodoEntry


Examples of se.ironic.modweb.domain.entity.TodoEntry

    public void testListWithEntries() throws Exception {
        try {
            userTransaction.begin();
            TodoList todoList = new TodoList("Testlist");

            TodoEntry te1 = creteEntry("#1", "d:#1");
            todoList.getEntries().add(te1);
            TodoList create = crudService.create(todoList);
            crudService.flush();
            List<TodoList> all = crudService.findByNamedQuery(TodoList.ALL);
            assertEquals(1, all.size());
            assertEquals(1, all.iterator().next().getEntries().size());
           
            Long id = create.getId();
           
            crudService.flush();
            TodoList find = crudService.find(TodoList.class, id);
            TodoEntry te2 = creteEntry("#2", "d:#2");
            find.getEntries().add(te2);
           
            crudService.update(find);
            crudService.flush();
            crudService.getEntityManager().clear();
View Full Code Here

Examples of se.ironic.modweb.domain.entity.TodoEntry

            userTransaction.rollback();
        }
    }

    private TodoEntry creteEntry(String title, String desc) {
        return new TodoEntry(title, desc, new Date());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.