use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.
the class PublicKeyCreationHandlerTest method verifyEnvCreationEvent.
private void verifyEnvCreationEvent() {
BaseNamedFlowEvent event = baseNamedFlowEvent.getValue();
assertThat(event).isInstanceOf(EnvCreationEvent.class);
EnvCreationEvent envCreationEvent = (EnvCreationEvent) event;
assertThat(envCreationEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
assertThat(envCreationEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
assertThat(envCreationEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
assertThat(envCreationEvent.selector()).isEqualTo(START_ENVIRONMENT_RESOURCE_ENCRYPTION_INITIALIZATION_EVENT.selector());
assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.
the class ClusterDefinitionDeleteHandlerTest method verifyEnvDeleteEvent.
private void verifyEnvDeleteEvent() {
BaseNamedFlowEvent event = baseNamedFlowEventCaptor.getValue();
assertThat(event).isInstanceOf(EnvDeleteEvent.class);
EnvDeleteEvent envDeleteEvent = (EnvDeleteEvent) event;
assertThat(envDeleteEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
assertThat(envDeleteEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
assertThat(envDeleteEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
assertThat(envDeleteEvent.selector()).isEqualTo(START_UMS_RESOURCE_DELETE_EVENT.selector());
assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.
the class IdBrokerMappingsDeleteHandlerTest method verifyEnvDeleteFailedEvent.
private void verifyEnvDeleteFailedEvent(Exception exceptionExpected) {
BaseNamedFlowEvent event = eventArgumentCaptor.getValue();
assertThat(event).isInstanceOf(EnvDeleteFailedEvent.class);
EnvDeleteFailedEvent envDeleteFailedEvent = (EnvDeleteFailedEvent) event;
assertThat(envDeleteFailedEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
assertThat(envDeleteFailedEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
assertThat(envDeleteFailedEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
assertThat(envDeleteFailedEvent.selector()).isEqualTo(FAILED_ENV_DELETE_EVENT.selector());
assertThat(envDeleteFailedEvent.getException()).isSameAs(exceptionExpected);
assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.
the class S3GuardTableDeleteHandlerTest method verifyEnvDeleteFailedEvent.
private void verifyEnvDeleteFailedEvent(Exception exceptionExpected) {
BaseNamedFlowEvent event = eventArgumentCaptor.getValue();
assertThat(event).isInstanceOf(EnvDeleteFailedEvent.class);
EnvDeleteFailedEvent envDeleteFailedEvent = (EnvDeleteFailedEvent) event;
assertThat(envDeleteFailedEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
assertThat(envDeleteFailedEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
assertThat(envDeleteFailedEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
assertThat(envDeleteFailedEvent.selector()).isEqualTo(FAILED_ENV_DELETE_EVENT.selector());
assertThat(envDeleteFailedEvent.getException()).isSameAs(exceptionExpected);
assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.
the class ResourceEncryptionInitializationHandlerTest method verifyEnvCreationEvent.
private void verifyEnvCreationEvent() {
BaseNamedFlowEvent event = baseNamedFlowEventCaptor.getValue();
assertThat(event).isInstanceOf(EnvCreationEvent.class);
EnvCreationEvent envCreationEvent = (EnvCreationEvent) event;
assertThat(envCreationEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
assertThat(envCreationEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
assertThat(envCreationEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
assertThat(envCreationEvent.selector()).isEqualTo(START_FREEIPA_CREATION_EVENT.selector());
assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
Aggregations