Search in sources :

Example 16 with MessageQuery

use of com.axibase.tsd.api.model.message.MessageQuery in project atsd-api-test by axibase.

the class MessageQueryTest method testISOTimezonePlusHourMinute.

@Issue("2850")
@Test
public void testISOTimezonePlusHourMinute() throws Exception {
    MessageQuery messageQuery = buildMessageQuery();
    messageQuery.setStartDate("2018-05-21T01:23:00+01:23");
    List<Message> storedMessageList = queryMessageResponse(messageQuery).readEntity(new GenericType<List<Message>>() {
    });
    Message storedMessage = storedMessageList.get(0);
    assertEquals("Incorrect message entity", message.getEntity(), storedMessage.getEntity());
    assertEquals("Incorrect message text", message.getMessage(), storedMessage.getMessage());
    assertEquals("Incorrect message date", message.getDate(), storedMessage.getDate());
}
Also used : Message(com.axibase.tsd.api.model.message.Message) MessageQuery(com.axibase.tsd.api.model.message.MessageQuery) Issue(io.qameta.allure.Issue) Test(org.testng.annotations.Test)

Aggregations

MessageQuery (com.axibase.tsd.api.model.message.MessageQuery)16 Issue (io.qameta.allure.Issue)12 Test (org.testng.annotations.Test)12 Message (com.axibase.tsd.api.model.message.Message)10 List (java.util.List)6 Response (javax.ws.rs.core.Response)5 Period (com.axibase.tsd.api.model.Period)4 Date (java.util.Date)1 GenericType (javax.ws.rs.core.GenericType)1 BeforeMethod (org.testng.annotations.BeforeMethod)1