@Test public void scanHandledMessageTypes_testSagaFound_returnsStartHandlerOfTypeString() throws NoSuchMethodException { sagaTypes.add(TestSaga.class); Map<Class<? extends Saga>, SagaHandlersMap> scanResult = sut.scanHandledMessageTypes(); SagaHandlersMap handlers = scanResult.get(TestSaga.class); assertThat( "Handler has entry with start saga flag set.", handlers.messageHandlers(), hasItem(samePropertyValuesAs(new MessageHandler(String.class, TestSaga.startupMethod(), true)))); }
@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);  }