@Test void onOrganizationRegisteredByAdminEvent_willDelegate() { organizationsEventHandler.on(new OrganizationRegisteredEvent(ORGANIZATION_ID, ADMIN_ID, ORGANIZATION_NAME, ORGANIZATION_WEBSITE_URL, ORGANIZATION_STREET, ORGANIZATION_CITY, ORGANIZATION_STATE, ORGANIZATION_COUNTRY, ORGANIZATION_POSTAL_CODE, ORGANIZATION_CONTACT_NAME, ORGANIZATION_PHONE_NUMBER, ORGANIZATION_EMAIL_ADDRESS), ORG_CREATION_TIME); verify(organizationsRepository).createOrganization(ORGANIZATION_ID, ORGANIZATION_NAME, ORGANIZATION_ADDRESS, ORGANIZATION_WEBSITE_URL, ORGANIZATION_CONTACT_NAME, ORGANIZATION_PHONE_NUMBER, ORGANIZATION_EMAIL_ADDRESS, false, ORG_CREATION_TIME); }
@EventHandler void on(OrganizationRegisteredEvent event, @Timestamp Instant creationTime) { LOGGER.info("Creating new registered organization {}", event.getOrganizationId()); var organizationAddress = new OrganizationAddress(event.getStreet(), event.getCity(), event.getState(), event.getCountry(), event.getPostalCode()); organizationsRepository.createOrganization(event.getOrganizationId(), event.getOrganizationName(), organizationAddress, event.getWebsiteUrl(), event.getContactName(), event.getContactPhoneNumber(), event.getContactEmail(), false, creationTime); }
OrganizationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegisteredEvent event, @Timestamp Instant creationTime) { LOGGER.info("Creating new registered organization {}", event.getOrganizationId()); var organizationAddress = new OrganizationAddress(event.getStreet(), event.getCity(), event.getState(), event.getCountry(), event.getPostalCode()); organizationsRepository.createOrganization(event.getOrganizationId(), event.getOrganizationName(), organizationAddress, event.getWebsiteUrl(), event.getContactName(), event.getContactPhoneNumber(), event.getContactEmail(), false, creationTime); } }
OrganizationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegisteredEvent event, @Timestamp Instant creationTime) { LOGGER.info("Creating new registered organization {}", event.getOrganizationId()); var organizationAddress = new OrganizationAddress(event.getStreet(), event.getCity(), event.getState(), event.getCountry(), event.getPostalCode()); organizationsRepository.createOrganization(event.getOrganizationId(), event.getOrganizationName(), organizationAddress, event.getWebsiteUrl(), event.getContactName(), event.getContactPhoneNumber(), event.getContactEmail(), false, creationTime); } @Autowired  OrganizationsEventHandler(OrganizationsRepository organizationsRepository); }
OrganizationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegisteredEvent event, @Timestamp Instant creationTime) { LOGGER.info("Creating new registered organization {}", event.getOrganizationId()); var organizationAddress = new OrganizationAddress(event.getStreet(), event.getCity(), event.getState(), event.getCountry(), event.getPostalCode()); organizationsRepository.createOrganization(event.getOrganizationId(), event.getOrganizationName(), organizationAddress, event.getWebsiteUrl(), event.getContactName(), event.getContactPhoneNumber(), event.getContactEmail(), false, creationTime); } @Autowired  OrganizationsEventHandler(OrganizationsRepository organizationsRepository); @ResetHandler void prepareForReplay(); }
OrganizationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegisteredEvent event, @Timestamp Instant creationTime) { LOGGER.info("Creating new registered organization {}", event.getOrganizationId()); var organizationAddress = new OrganizationAddress(event.getStreet(), event.getCity(), event.getState(), event.getCountry(), event.getPostalCode()); organizationsRepository.createOrganization(event.getOrganizationId(), event.getOrganizationName(), organizationAddress, event.getWebsiteUrl(), event.getContactName(), event.getContactPhoneNumber(), event.getContactEmail(), false, creationTime); } @Autowired  OrganizationsEventHandler(OrganizationsRepository organizationsRepository); @ResetHandler void prepareForReplay();  }