Package org.dayatang.persistence.test.domain

Examples of org.dayatang.persistence.test.domain.DictionaryCategory


        graduate = createDictionary("02", "研究生", education, 200, "05");
        associate = createDictionary("03", "专科", education, 300, "05");
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        repository.save(category);
        repository.flush();
        return category;
    }
View Full Code Here


        assertTrue(results.contains(education));
    }

    @Test
    public void testIsEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.isEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertTrue(results.contains(empty));
        assertFalse(results.contains(gender));
        assertFalse(results.contains(education));
View Full Code Here

        assertFalse(results.contains(education));
    }

    @Test
    public void testNotEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.notEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertFalse(results.contains(empty));
        assertTrue(results.contains(gender));
        assertTrue(results.contains(education));
View Full Code Here

        List<Dictionary> results = repository.find(instance.eq("category.name", "education"));
        assertTrue(results.contains(undergraduate));
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        repository.save(category);
        repository.flush();
        return category;
    }
View Full Code Here

        assertTrue(results.contains(education));
    }

    @Test
    public void testIsEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance = repository.createCriteriaQuery(DictionaryCategory.class);
        List<DictionaryCategory> results = instance.isEmpty("dictionaries").list();
        assertTrue(results.contains(empty));
        assertFalse(results.contains(gender));
        assertFalse(results.contains(education));
View Full Code Here

        assertFalse(results.contains(education));
    }

    @Test
    public void testNotEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance = repository.createCriteriaQuery(DictionaryCategory.class);
        List<DictionaryCategory> results = instance.notEmpty("dictionaries").list();
        assertFalse(results.contains(empty));
        assertTrue(results.contains(gender));
        assertTrue(results.contains(education));
View Full Code Here

        Dictionary doctor = Dictionary.get(46L);
        assertFalse(results.contains(doctor));
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        entityManager.persist(category);
        return category;
    }
View Full Code Here

        graduate = createDictionary("02", "研究生", education, 200, "05");
        associate = createDictionary("03", "专科", education, 300, "05");
    }

    private DictionaryCategory createCategory(String name, int sortOrder) {
        DictionaryCategory category = new DictionaryCategory();
        category.setName(name);
        category.setSortOrder(sortOrder);
        repository.save(category);
        repository.flush();
        return category;
    }
View Full Code Here

        assertTrue(results.contains(education));
    }

    @Test
    public void testIsEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.isEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertTrue(results.contains(empty));
        assertFalse(results.contains(gender));
        assertFalse(results.contains(education));
View Full Code Here

        assertFalse(results.contains(education));
    }

    @Test
    public void testNotEmpty() {
        DictionaryCategory empty = createCategory("a", 3);
        instance2.notEmpty("dictionaries");
        List<DictionaryCategory> results = repository.find(instance2);
        assertFalse(results.contains(empty));
        assertTrue(results.contains(gender));
        assertTrue(results.contains(education));
View Full Code Here

TOP

Related Classes of org.dayatang.persistence.test.domain.DictionaryCategory

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.