use of org.eclipse.che.api.system.shared.dto.SystemStatusChangedEventDto in project che by eclipse.
the class DtoConverterTest method convertsSystemStatusChangedEvent.
@Test
public void convertsSystemStatusChangedEvent() {
SystemStatusChangedEvent event = new SystemStatusChangedEvent(RUNNING, PREPARING_TO_SHUTDOWN);
SystemStatusChangedEventDto dto = DtoConverter.asDto(event);
assertEquals(dto.getType(), EventType.STATUS_CHANGED);
assertEquals(dto.getPrevStatus(), event.getPrevStatus());
assertEquals(dto.getStatus(), event.getStatus());
}
use of org.eclipse.che.api.system.shared.dto.SystemStatusChangedEventDto in project che by eclipse.
the class DtoConverter method asDto.
/**
* Creates {@link SystemStatusChangedEventDto} from event.
*/
public static SystemStatusChangedEventDto asDto(SystemStatusChangedEvent event) {
SystemStatusChangedEventDto dto = DtoFactory.newDto(SystemStatusChangedEventDto.class);
dto.setType(event.getType());
dto.setStatus(event.getStatus());
dto.setPrevStatus(event.getPrevStatus());
return dto;
}
Aggregations