Class SelectedAlternative02Test

  • All Implemented Interfaces:
    org.testng.IHookable, org.testng.ITestNGListener

    @SpecVersion(spec="cdi",
                 version="2.0")
    public class SelectedAlternative02Test
    extends AbstractTest
    Test resolution of ambiguous dependencies. WAR deployment with 2 libraries:
    • WEB-INF/classes - alpha - does not declare any alternative, includes TestBean implementation
    • lib 1 - bravo - declares Foo alternative selected for the app with priority 1000
    • lib 2 - charlie - declares Bar alternative selected for the app with priority 2000
    Expected result: Bar is resolved in all bean archives
    Author:
    Martin Kouba
    • Constructor Detail

      • SelectedAlternative02Test

        public SelectedAlternative02Test()
    • Method Detail

      • createTestArchive

        @Deployment
        public static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()
      • testDependencyResolvable

        @SpecAssertion(section="unsatisfied_and_ambig_dependencies",
                       id="cb")
        public void testDependencyResolvable()