Package com.cumulocity.sdk.client.devicecontrol.autopoll

Examples of com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsQueue


   
    @Test
    public void emptyQueueShouldAcceptMoreThanOneMeasurementAgentRequest() throws InterruptedException {
        //given
        MeasurementRequestTask mrt = new MeasurementRequestTask();
        OperationsQueue queue = new OperationsQueue();
       
        //when
        queue.add(mrt.getNewMeasurementOperation());
        Thread.sleep(1); // unique measurement operations use system time in millis. To ensure unique op wait at least 1 milli
        queue.add(mrt.getNewMeasurementOperation());
       
        //then
        assertTrue(queue.size() == 2);
    }
View Full Code Here


public class OperationsQueueTest {
    OperationsQueue testObj;
   
    @Before
    public void setUp() {
        testObj = new OperationsQueue();
        OperationRepresentation op1 = new OperationRepresentation();
        op1.setId(new GId("op1"));
        OperationRepresentation op2 = new OperationRepresentation();
        op2.setId(new GId("op2"));
        testObj.add(op1);
View Full Code Here

TOP

Related Classes of com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsQueue

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.