@Test public void scanHandledMessageTypes_testSagaFound_returnsEntryWithHandlers() { sagaTypes.add(TestSaga.class); Map<Class<? extends Saga>, SagaHandlersMap> scanResult = sut.scanHandledMessageTypes(); assertThat("Expected one entry in scan result.", scanResult.size(), equalTo(1)); assertThat("Expected entry of key TestSage.class", scanResult.containsKey(TestSaga.class), is(true)); SagaHandlersMap handlers = scanResult.get(TestSaga.class); assertThat("Expected three total message handlers for saga.", handlers.messageHandlers(), hasSize(3)); }
@Override public Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes() { if (scanResult == null) { populateSagaHandlers(); } return scanResult; }
AnnotationSagaAnalyzer implements SagaAnalyzer { @Override public Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes() { if (scanResult == null) { populateSagaHandlers(); } return scanResult; } }
AnnotationSagaAnalyzer implements SagaAnalyzer { @Override public Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes() { if (scanResult == null) { populateSagaHandlers(); } return scanResult; } @Inject  AnnotationSagaAnalyzer(final TypeScanner typeScanner); }
AnnotationSagaAnalyzer implements SagaAnalyzer { @Override public Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes() { if (scanResult == null) { populateSagaHandlers(); } return scanResult; } @Inject  AnnotationSagaAnalyzer(final TypeScanner typeScanner); @Override Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes(); void addStartSagaAnnotation(final Class<? extends Annotation> annotationClass); void addHandlerAnnotation(final Class<? extends Annotation> annotationClass); }
AnnotationSagaAnalyzer implements SagaAnalyzer { @Override public Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes() { if (scanResult == null) { populateSagaHandlers(); } return scanResult; } @Inject  AnnotationSagaAnalyzer(final TypeScanner typeScanner); @Override Map<Class<? extends Saga>, SagaHandlersMap> scanHandledMessageTypes(); void addStartSagaAnnotation(final Class<? extends Annotation> annotationClass); void addHandlerAnnotation(final Class<? extends Annotation> annotationClass);  }