use of org.glassfish.api.admin.progress.ProgressStatusEvent in project Payara by payara.
the class ProgressStatusEventTest method testEventCreateChild.
@Test
public void testEventCreateChild() throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
writer.writeTo(EVENT_CREATE_CHILD, null, null, null, MediaType.APPLICATION_JSON_TYPE, null, baos);
baos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ProgressStatusEvent event = reader.readFrom(bais, MediaType.APPLICATION_JSON);
assertEquals(event, EVENT_CREATE_CHILD);
}
use of org.glassfish.api.admin.progress.ProgressStatusEvent in project Payara by payara.
the class ProgressStatusEventTest method testEventProgress.
@Test
public void testEventProgress() throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
writer.writeTo(EVENT_PROGRESS, null, null, null, MediaType.APPLICATION_JSON_TYPE, null, baos);
baos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ProgressStatusEvent event = reader.readFrom(bais, MediaType.APPLICATION_JSON);
assertEquals(event, EVENT_PROGRESS);
}
Aggregations