Contexts and Dependency Injection Developer Tests

This page lists the ideas for developer tests that are to be developed for [3.1|^3.1CDI]

CDI usecases

  • Test all these unit tests in full profile and web-profile(wherever applicable)
  • support for dependency injection into various kinds of beans(ManagedBeans, EJB Singleton Beans, SFSB, MDB, Interceptors, Servlets, Servlet Filters, JAX-WS service endpoints, JAX-WS handlers, JSP tag handlers, JSP Tab libraries, handlers)
  • Typesafe dependency resolution- test straightforward usecases of Qualifiers, Alternatives and test ambiguous and unsatisfied dependency cases (test exactlt on Bean that satisfies each InjectionPoint is allowed)
  • Test support for detection of unproxyable dependencies
  • Test availability of default API types
  • Test specification of API type via @Typed
  • Programmatic lookup of a contextual instance - Test @Inject Instance<T> with qualifiers(with and without members), scopes etc
  • test expose a JDK class, a JPA entity as a Bean using Producer methods
  • Test @New in producer methods
  • Test Disposer methods(SFSB @Remove methods as well)
  • Interceptors – (test @AroundInvoke, @PostConstruct), test custom Interceptors
  • Test ordering of Interceptors
  • Test InterceptorBindingType inheritance(stacking of InterceptorBinding)
  • Test for legacy support of @Interceptors(...)
  • Test various kinds of Decorators and Interceptors ordering for a Bean
  • Test Decorators: Delegate Injection Point
  • Test Decorator ordering
  • Test event producer, consumers where producers and consumers are in different type of Beans, different scopes etc. Test conditional observers, transactional observers(Rollback, Commit, transaction begin/end)
  • Test multiple stereotypes defined in a Bean(see how conflicts are handled)
  • Test overriding a stereotype in a Bean
  • Test Stereotype stacking
  • Test @Model in a JSF sample
  • @Specializes and @Alternatives inheritance usecases
  • Test handling of @Named in @Specializes
  • Test use of Java EE component environment resources as "resources" (producer field referring to a java:/comp/env resource)
  • Test availability of Built-in beans(UserTransaction, Principal, ValidatorFactory, Validator)
  • Test lifecycle methods on ManagedBeans ( @PostConstruct , @PreDestroy )
  • Java EE component environment injection in ManagedBeans
  • Test Dependency injection in MDB
  • Test CDI Interceptors on MDBs
  • Test Portable extensions(- registering a framework Bean, wrapping an annotated type, adding InjectionTarget, custom scopes)
  • Test availability of java:comp/BeanManager in an application component
  • Test built-in scopes (Request, Session, Conversation, Application) scopes
  • Test use of CDI in application clients, Java SE, embedded modes
  • Test a complete/comprehensive EE6 web application sample that employs JAX-RS, CDI, Servlet 3, EJB3.1, JPA2, JSF2 like the one here

Weld-integration specific usecases

  • Ensure tests exists that covers all integration points(JSF, EJB, Transactions, JPA, JNDI) in the Weld SPI.
  • Make existing Weld samples(Weld number-guess and translator) as unit tests.
  • Test existing portable Weld extensions such as Weld Logger, Weld wicket extension work in GlassFish