use of org.eclipse.che.api.system.shared.dto.SystemServiceItemStoppedEventDto in project che by eclipse.
the class DtoConverterTest method convertsSystemServiceItemStoppedEvent.
@Test
public void convertsSystemServiceItemStoppedEvent() {
SystemServiceItemStoppedEvent event = new SystemServiceItemStoppedEvent("service1", "workspace1", 3, 5);
SystemServiceItemStoppedEventDto dto = DtoConverter.asDto(event);
assertEquals(dto.getType(), EventType.SERVICE_ITEM_STOPPED);
assertEquals(dto.getService(), event.getServiceName());
assertEquals(dto.getItem(), event.getItem());
assertEquals(dto.getCurrent(), event.getCurrent());
assertEquals(dto.getTotal(), event.getTotal());
}
use of org.eclipse.che.api.system.shared.dto.SystemServiceItemStoppedEventDto in project che by eclipse.
the class DtoConverter method asDto.
/**
* Creates {@link SystemServiceItemStoppedEventDto} from event.
*/
public static SystemServiceItemStoppedEventDto asDto(SystemServiceItemStoppedEvent event) {
SystemServiceItemStoppedEventDto dto = DtoFactory.newDto(SystemServiceItemStoppedEventDto.class);
dto.setService(event.getServiceName());
dto.setType(event.getType());
dto.setCurrent(event.getCurrent());
dto.setTotal(event.getTotal());
dto.setItem(event.getItem());
return dto;
}
Aggregations