use of com.serotonin.m2m2.db.dao.PublishedPointDao in project ma-core-public by infiniteautomation.
the class PublisherAuditTest method testPublishedPointAuditTrail.
@Test
public void testPublishedPointAuditTrail() {
PublishedPointDao dao = PublishedPointDao.getInstance();
IDataPoint dp = createMockDataPoints(1).get(0);
MockPublisherVO publisher = createMockPublisher(false);
MockPublishedPointVO vo = publisher.getDefinition().createPublishedPointVO(publisher, dp);
vo.setName(dp.getName());
vo.setEnabled(false);
dao.insert(vo);
// Update and delete
vo.setName("New Name");
dao.update(vo.getId(), vo);
dao.delete(vo.getId());
List<AuditEventInstanceVO> auditEvents = getAuditEvents(AuditEventType.TYPE_PUBLISHED_POINT, vo.getId());
Assert.assertEquals(3, auditEvents.size());
}
use of com.serotonin.m2m2.db.dao.PublishedPointDao in project ma-core-public by MangoAutomation.
the class PublisherAuditTest method testPublishedPointAuditTrail.
@Test
public void testPublishedPointAuditTrail() {
PublishedPointDao dao = PublishedPointDao.getInstance();
IDataPoint dp = createMockDataPoints(1).get(0);
MockPublisherVO publisher = createMockPublisher(false);
MockPublishedPointVO vo = publisher.getDefinition().createPublishedPointVO(publisher, dp);
vo.setName(dp.getName());
vo.setEnabled(false);
dao.insert(vo);
// Update and delete
vo.setName("New Name");
dao.update(vo.getId(), vo);
dao.delete(vo.getId());
List<AuditEventInstanceVO> auditEvents = getAuditEvents(AuditEventType.TYPE_PUBLISHED_POINT, vo.getId());
Assert.assertEquals(3, auditEvents.size());
}
Aggregations