@Test public void testMissingServletContext() { givenMissingServletContext(); try { underTest.initialize(serviceLocator); fail(); } catch (SeedException e) { assertThat(e.getErrorCode()).isEqualTo(Jersey2ErrorCode.MISSING_SERVLET_CONTEXT); } }
public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } } }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  void initialize(InjectionManager injectionManager); @Override boolean bind(Class<?> component, Set<Class<?>> providerContracts); @Override void done(); }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  void initialize(InjectionManager injectionManager); @Override boolean bind(Class<?> component, Set<Class<?>> providerContracts); @Override void done();  }