@Test public void itShouldRegisterComponents() throws Exception { Object[] expectedComponents = { components.eventsResource(), components.eventRegistrationsResource(), components.eventRunsResource(), components.eventResultsResource(), components.handicapGroupsResource(), components.handicapGroupSetsResource(), components.competitionGroupsResource(), components.competitionGroupSetsResource(), components.domainServiceExceptionMapper(), components.runtimeExceptionUnwrappingMapper() }; application.run(config, environment); Arrays.stream(expectedComponents).forEach(o -> verify(jersey).register(o)); verifyNoMoreInteractions(jersey); }
@Override public void run( ConerCoreConfiguration conerCoreConfiguration, Environment environment ) throws Exception { initComponents(conerCoreConfiguration); JerseyEnvironment jersey = environment.jersey(); jersey.register(components.eventsResource()); jersey.register(components.eventRegistrationsResource()); jersey.register(components.eventRunsResource()); jersey.register(components.eventResultsResource()); jersey.register(components.handicapGroupsResource()); jersey.register(components.handicapGroupSetsResource()); jersey.register(components.competitionGroupsResource()); jersey.register(components.competitionGroupSetsResource()); jersey.register(components.domainServiceExceptionMapper()); jersey.register(components.runtimeExceptionUnwrappingMapper()); optionallyRegisterHsqlDatabaseManagerSwingTask(environment, conerCoreConfiguration); }
ConerCoreApplication extends Application<ConerCoreConfiguration> { @Override public void run( ConerCoreConfiguration conerCoreConfiguration, Environment environment ) throws Exception { initComponents(conerCoreConfiguration); JerseyEnvironment jersey = environment.jersey(); jersey.register(components.eventsResource()); jersey.register(components.eventRegistrationsResource()); jersey.register(components.eventRunsResource()); jersey.register(components.eventResultsResource()); jersey.register(components.handicapGroupsResource()); jersey.register(components.handicapGroupSetsResource()); jersey.register(components.competitionGroupsResource()); jersey.register(components.competitionGroupSetsResource()); jersey.register(components.domainServiceExceptionMapper()); jersey.register(components.runtimeExceptionUnwrappingMapper()); optionallyRegisterHsqlDatabaseManagerSwingTask(environment, conerCoreConfiguration); } }
ConerCoreApplication extends Application<ConerCoreConfiguration> { @Override public void run( ConerCoreConfiguration conerCoreConfiguration, Environment environment ) throws Exception { initComponents(conerCoreConfiguration); JerseyEnvironment jersey = environment.jersey(); jersey.register(components.eventsResource()); jersey.register(components.eventRegistrationsResource()); jersey.register(components.eventRunsResource()); jersey.register(components.eventResultsResource()); jersey.register(components.handicapGroupsResource()); jersey.register(components.handicapGroupSetsResource()); jersey.register(components.competitionGroupsResource()); jersey.register(components.competitionGroupSetsResource()); jersey.register(components.domainServiceExceptionMapper()); jersey.register(components.runtimeExceptionUnwrappingMapper()); optionallyRegisterHsqlDatabaseManagerSwingTask(environment, conerCoreConfiguration); }  }
ConerCoreApplication extends Application<ConerCoreConfiguration> { @Override public void run( ConerCoreConfiguration conerCoreConfiguration, Environment environment ) throws Exception { initComponents(conerCoreConfiguration); JerseyEnvironment jersey = environment.jersey(); jersey.register(components.eventsResource()); jersey.register(components.eventRegistrationsResource()); jersey.register(components.eventRunsResource()); jersey.register(components.eventResultsResource()); jersey.register(components.handicapGroupsResource()); jersey.register(components.handicapGroupSetsResource()); jersey.register(components.competitionGroupsResource()); jersey.register(components.competitionGroupSetsResource()); jersey.register(components.domainServiceExceptionMapper()); jersey.register(components.runtimeExceptionUnwrappingMapper()); optionallyRegisterHsqlDatabaseManagerSwingTask(environment, conerCoreConfiguration); }  static void main(String[] args); @Override void initialize(
            Bootstrap<ConerCoreConfiguration> bootstrap
    ); @Override void run(
            ConerCoreConfiguration conerCoreConfiguration,
            Environment environment
    ); }
ConerCoreApplication extends Application<ConerCoreConfiguration> { @Override public void run( ConerCoreConfiguration conerCoreConfiguration, Environment environment ) throws Exception { initComponents(conerCoreConfiguration); JerseyEnvironment jersey = environment.jersey(); jersey.register(components.eventsResource()); jersey.register(components.eventRegistrationsResource()); jersey.register(components.eventRunsResource()); jersey.register(components.eventResultsResource()); jersey.register(components.handicapGroupsResource()); jersey.register(components.handicapGroupSetsResource()); jersey.register(components.competitionGroupsResource()); jersey.register(components.competitionGroupSetsResource()); jersey.register(components.domainServiceExceptionMapper()); jersey.register(components.runtimeExceptionUnwrappingMapper()); optionallyRegisterHsqlDatabaseManagerSwingTask(environment, conerCoreConfiguration); }  static void main(String[] args); @Override void initialize(
            Bootstrap<ConerCoreConfiguration> bootstrap
    ); @Override void run(
            ConerCoreConfiguration conerCoreConfiguration,
            Environment environment
    );  }