Search in sources :

Example 1 with MockPublisherDefinition

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

the class PublisherAuditTest method testPublisherAuditTrail.

@Test
public void testPublisherAuditTrail() {
    MockPublisherVO vo = new MockPublisherVO();
    vo.setDefinition(new MockPublisherDefinition());
    vo.setXid("PUB_TEST1");
    vo.setPoints(createPoints());
    vo.setEnabled(false);
    PublisherDao.instance.savePublisher(vo);
    // Modify and re-save
    vo.setEnabled(true);
    PublisherDao.instance.savePublisher(vo);
// TODO Verify Audit Events
}
Also used : MockPublisherDefinition(com.serotonin.m2m2.vo.publish.mock.MockPublisherDefinition) MockPublisherVO(com.serotonin.m2m2.vo.publish.mock.MockPublisherVO) Test(org.junit.Test)

Example 2 with MockPublisherDefinition

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

the class PublisherAuditTest method addDefinitions.

@BeforeClass
public static void addDefinitions() {
    List<ModuleElementDefinition> definitions = new ArrayList<>();
    definitions.add(new MockPublisherDefinition());
    addModule("mockPublisher", definitions);
}
Also used : ModuleElementDefinition(com.serotonin.m2m2.module.ModuleElementDefinition) MockPublisherDefinition(com.serotonin.m2m2.vo.publish.mock.MockPublisherDefinition) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass)

Aggregations

MockPublisherDefinition (com.serotonin.m2m2.vo.publish.mock.MockPublisherDefinition)2 ModuleElementDefinition (com.serotonin.m2m2.module.ModuleElementDefinition)1 MockPublisherVO (com.serotonin.m2m2.vo.publish.mock.MockPublisherVO)1 ArrayList (java.util.ArrayList)1 BeforeClass (org.junit.BeforeClass)1 Test (org.junit.Test)1