Package com.cumulocity.rest.representation.event

Examples of com.cumulocity.rest.representation.event.EventCollectionRepresentation


    }

    @When("I should get next page which has current page '(\\d+)' and events '(\\d+)'$")
    public void iQueryAllByNextPage(int currentPage, int numEvents) throws SDKException {
        try {
            EventCollectionRepresentation collectionRepresentation = eventApi.getEvents().getNextPage(collection1);
            assertThat(collectionRepresentation.getPageStatistics().getCurrentPage(), is(currentPage));
            assertThat(collectionRepresentation.getEvents().size(), is(numEvents));
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }

    }
View Full Code Here


    }

    @When("I should get previous page which has current page '(\\d+)' and events '(\\d+)'$")
    public void iQueryAllByPreviousPage(int currentPage, int numEvents) throws SDKException {
        try {
            EventCollectionRepresentation collectionRepresentation = eventApi.getEvents().getPreviousPage(collection1);
            assertThat(currentPage, is(equalTo(collectionRepresentation.getPageStatistics().getCurrentPage())));
            assertThat(numEvents, is(equalTo(collectionRepresentation.getEvents().size())));
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }

    }
View Full Code Here

    private UrlProcessor urlProcessor;

    @Before
    public void setup() throws Exception {
        MockitoAnnotations.initMocks(this);
        EventCollectionRepresentation eventCollectionRepresentation = new EventCollectionRepresentation();
        eventCollectionRepresentation.setSelf(EVENTS_COLLECTION_URL);
        eventsApiRepresentation.setEvents(eventCollectionRepresentation);

        eventApi = new EventApiImpl(restConnector, urlProcessor, eventsApiRepresentation, DEFAULT_PAGE_SIZE);
    }
View Full Code Here

TOP

Related Classes of com.cumulocity.rest.representation.event.EventCollectionRepresentation

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.