use of org.eclipse.che.api.system.shared.dto.SystemServiceEventDto in project che by eclipse.
the class DtoConverter method asDto.
/**
* Creates {@link SystemServiceEventDto} from event.
*/
public static SystemServiceEventDto asDto(SystemServiceEvent event) {
SystemServiceEventDto dto = DtoFactory.newDto(SystemServiceEventDto.class);
dto.setService(event.getServiceName());
dto.setType(event.getType());
return dto;
}
use of org.eclipse.che.api.system.shared.dto.SystemServiceEventDto in project che by eclipse.
the class DtoConverterTest method convertsSystemServiceStoppedEvent.
@Test
public void convertsSystemServiceStoppedEvent() {
SystemServiceStoppedEvent event = new SystemServiceStoppedEvent("service1");
SystemServiceEventDto dto = DtoConverter.asDto(event);
assertEquals(dto.getType(), EventType.SERVICE_STOPPED);
assertEquals(dto.getService(), event.getServiceName());
}
use of org.eclipse.che.api.system.shared.dto.SystemServiceEventDto in project che by eclipse.
the class DtoConverterTest method convertsSystemServiceStoppingEvent.
@Test
public void convertsSystemServiceStoppingEvent() {
StoppingSystemServiceEvent event = new StoppingSystemServiceEvent("service1");
SystemServiceEventDto dto = DtoConverter.asDto(event);
assertEquals(dto.getType(), EventType.STOPPING_SERVICE);
assertEquals(dto.getService(), event.getServiceName());
}
Aggregations