Package com.coherentlogic.wb.client.core.domain

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


    private DataPointsDAO dataPointsDAO = null;

    private DataPoints dataPoints = null;

    static DataPoints createDataPoints () {
        DataPoints result = new DataPoints ();

        List<DataPoint> dataPointList = new ArrayList<DataPoint> ();

        DataPoint dataPoint = DataPointDAOTest.createDataPoint();

        dataPointList.add(dataPoint);

        result.setDataPointList(dataPointList);

        result.setPage(0);
        result.setPages(1);
        result.setPerPage(2);
        result.setTotal(3);

        return result;
    }
View Full Code Here


        Long primaryKey = dataPoints.getPrimaryKey();

        assertNotNull(primaryKey);

        DataPoints dataPoints2 =
            dataPointsDAO.find(primaryKey);

        assertNotNull(dataPoints2);
        assertEquals(dataPoints, dataPoints2);

        dataPoints2.setTotal(2);

        dataPointsDAO.merge(dataPoints2);

        DataPoints dataPoints3 =
            dataPointsDAO.find(primaryKey);

        assertEquals((Integer) 2, dataPoints3.getTotal ());

        dataPointsDAO.remove(dataPoints3);

        DataPoints dataPoints4 =
            dataPointsDAO.find(primaryKey);

        assertNull(dataPoints4);
    }
View Full Code Here

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

        DataPoints result = queryBuilder
            .countries("br", "gb")
            .indicators("SP.POP.TOTL")
            .setDate("1998:2003")
            .doGet(DataPoints.class);

        assertEquals (
            "http://api.worldbank.org/countries/br;gb/indicators/SP.POP.TOTL?" +
            "date=1998:2003",
            queryBuilder.getEscapedURI());

        assertNotNull (result);

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

        List<DataPoint> dataPointList = result.getDataPointList();

        assertEquals(12, dataPointList.size());

        DataPoint dataPoint = dataPointList.get(4);
View Full Code Here

TOP

Related Classes of com.coherentlogic.wb.client.core.domain.DataPoints

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.