Examples of CatalogSources


Examples of com.coherentlogic.wb.client.core.domain.CatalogSources

        Long uniqueId = catalogSources.getPrimaryKey();

        assertNotNull (uniqueId);

        CatalogSources persistedCatalogSources =
            catalogSourcesDAO.find(uniqueId);

        List<CatalogSource> persistedCatalogSourceList =
            persistedCatalogSources.getSourceList();

        assertNotNull (persistedCatalogSources);
        assertEquals (28, persistedCatalogSourceList.size());

        CatalogSource catalogSource = persistedCatalogSourceList.remove(0);

        catalogSource.getPrimaryKey();

        catalogSourcesDAO.merge(persistedCatalogSources);

        CatalogSources mergedCatalogSources =
            catalogSourcesDAO.find(uniqueId);

        List<CatalogSource> mergedCatalogSourceList =
            persistedCatalogSources.getSourceList();

        assertEquals (27, mergedCatalogSourceList.size());

        catalogSourcesDAO.remove(mergedCatalogSources);

        CatalogSources nullCatalogSources =
            catalogSourcesDAO.find(uniqueId);

        assertNull (nullCatalogSources);
    }
View Full Code Here

Examples of com.coherentlogic.wb.client.core.domain.CatalogSources

    public void testGetSources() {

        QueryBuilder queryBuilder =
            new QueryBuilder (restTemplate, "http://api.worldbank.org/sources");

        CatalogSources result = queryBuilder
            .doGet(CatalogSources.class);

        assertNotNull (result);

        reviewPaginationProperties (1, 1, 50, 36, result);

        CatalogSource firstSource = result.getSourceList().get(0);

        // No value will be set here.
        reviewIdValuePair(Long.toString(11L), null, firstSource);

        assertEquals("Africa Development Indicators", firstSource.getName());
View Full Code Here

Examples of com.coherentlogic.wb.client.core.domain.CatalogSources

    public void testGetSources2() {

        QueryBuilder queryBuilder =
            new QueryBuilder (restTemplate, "http://api.worldbank.org");

        CatalogSources result = queryBuilder
            .source("12")
            .setPerPage(10)
            .doGet(CatalogSources.class);

        assertNotNull (result);

        reviewPaginationProperties (1, 1, 10, 1, result);

        CatalogSource firstSource = result.getSourceList().get(0);

        // No value will be set here.
        reviewIdValuePair(Long.toString(12L), null, firstSource);

        assertEquals("Education Statistics", firstSource.getName());
View Full Code Here

Examples of com.coherentlogic.wb.client.core.domain.CatalogSources

    public void testGetSource () {
        QueryBuilder queryBuilder =
            new QueryBuilder (restTemplate,
                "http://api.worldbank.org/");

        CatalogSources sources = queryBuilder
            .source("11")
            .setPerPage(10)
            .doGet(CatalogSources.class);

        CatalogSource expected = new CatalogSource();
        expected.setId("11");
        expected.setName("Africa Development Indicators");

        List<CatalogSource> catalogSourceList = sources.getSourceList();

        CatalogSource actual = catalogSourceList.get(0);

        assertNotNull(actual);
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.