Search in sources :

Example 1 with MockPublishedPointVO

use of com.serotonin.m2m2.vo.publish.mock.MockPublishedPointVO in project ma-core-public by infiniteautomation.

the class PublisherAuditTest method createPoints.

protected List<MockPublishedPointVO> createPoints() {
    List<MockPublishedPointVO> points = new ArrayList<MockPublishedPointVO>(pointCount);
    // Create data source?
    MockDataSourceVO ds = new MockDataSourceVO();
    ds.setXid("DS_TEST1");
    ds.setName("TEST");
    DataSourceDao.instance.save(ds);
    for (int i = 1; i < pointCount + 1; i++) {
        DataPointVO dp = new DataPointVO();
        dp.setXid("DP_" + i);
        dp.setPointLocator(new MockPointLocatorVO(DataTypes.NUMERIC, true));
        dp.setDataSourceId(ds.getId());
        DataPointDao.instance.save(dp);
        MockPublishedPointVO vo = new MockPublishedPointVO();
        vo.setDataPointId(i);
        points.add(vo);
    }
    return points;
}
Also used : DataPointVO(com.serotonin.m2m2.vo.DataPointVO) MockDataSourceVO(com.serotonin.m2m2.vo.dataSource.mock.MockDataSourceVO) ArrayList(java.util.ArrayList) MockPublishedPointVO(com.serotonin.m2m2.vo.publish.mock.MockPublishedPointVO) MockPointLocatorVO(com.serotonin.m2m2.vo.dataPoint.MockPointLocatorVO)

Aggregations

DataPointVO (com.serotonin.m2m2.vo.DataPointVO)1 MockPointLocatorVO (com.serotonin.m2m2.vo.dataPoint.MockPointLocatorVO)1 MockDataSourceVO (com.serotonin.m2m2.vo.dataSource.mock.MockDataSourceVO)1 MockPublishedPointVO (com.serotonin.m2m2.vo.publish.mock.MockPublishedPointVO)1 ArrayList (java.util.ArrayList)1