Package org.jboss.cdi.tck.literals

Examples of org.jboss.cdi.tck.literals.DefaultLiteral


    @Test
    @SpecAssertion(section = DYNAMIC_LOOKUP, id = "da")
    public void testDuplicateBindingsThrowsException() {
        try {
            ObtainsInstanceBean injectionPoint = getContextualReference(ObtainsInstanceBean.class);
            injectionPoint.getAnyPaymentProcessor().select(new DefaultLiteral(), new DefaultLiteral());
        } catch (Throwable t) {
            assert isThrowablePresent(IllegalArgumentException.class, t);
            return;
        }
        assert false;
View Full Code Here


        return Instance.class;
    }

    @Override
    public Set<Annotation> getQualifiers() {
        Annotation defaultQualifier = new DefaultLiteral();
        return Collections.singleton(defaultQualifier);
    }
View Full Code Here

    @Test
    @SpecAssertions({ @SpecAssertion(section = BUILTIN_QUALIFIERS, id = "a0"), @SpecAssertion(section = BUILTIN_QUALIFIERS, id = "aa") })
    public void testDefaultQualifierDeclaredInJava() {
        Bean<Order> order = getBeans(Order.class).iterator().next();
        assert order.getQualifiers().size() == 2;
        assert order.getQualifiers().contains(new DefaultLiteral());
        assert order.getQualifiers().contains(AnyLiteral.INSTANCE);
    }
View Full Code Here

    @SpecAssertions({ @SpecAssertion(section = BUILTIN_QUALIFIERS, id = "b"), @SpecAssertion(section = BEAN, id = "c") })
    public void testDefaultQualifierForInjectionPoint() {
        Bean<Order> order = getBeans(Order.class).iterator().next();
        assert order.getInjectionPoints().size() == 1;
        InjectionPoint injectionPoint = order.getInjectionPoints().iterator().next();
        assert injectionPoint.getQualifiers().contains(new DefaultLiteral());
    }
View Full Code Here

    @Test
    @SpecAssertion(section = TYPE_LEVEL_INHERITANCE, id = "aaa")
    public void testQualifierNotDeclaredInheritedIsNotInherited() {
        Set<? extends Annotation> bindings = getBeans(ShetlandPony.class).iterator().next().getQualifiers();
        assert bindings.size() == 2;
        assert bindings.contains(new DefaultLiteral());
        assert bindings.contains(AnyLiteral.INSTANCE);
    }
View Full Code Here

    @Test
    @SpecAssertion(section = TYPE_LEVEL_INHERITANCE, id = "aga")
    public void testQualifierNotDeclaredInheritedIsNotIndirectlyInherited() {
        Set<? extends Annotation> bindings = getBeans(MiniatureShetlandPony.class).iterator().next().getQualifiers();
        assert bindings.size() == 2;
        assert bindings.contains(new DefaultLiteral());
        assert bindings.contains(AnyLiteral.INSTANCE);
    }
View Full Code Here

        assert getBeans(LoggerConsumer.class).size() == 1;
        Bean<LoggerConsumer> bean = getBeans(LoggerConsumer.class).iterator().next();
        InjectionPoint loggerInjectionPoint = null;
        for (InjectionPoint ip : bean.getInjectionPoints()) {
            if (ip.getAnnotated().getTypeClosure().contains(Logger.class) && ip.getQualifiers().size() == 1
                    && ip.getQualifiers().contains(new DefaultLiteral())) {
                loggerInjectionPoint = ip;
            }
        }

        // Now lookup an injectable reference and check that it is of type Logger
View Full Code Here

        return Event.class;
    }

    @Override
    public Set<Annotation> getQualifiers() {
        Annotation defaultQualifier = new DefaultLiteral();
        return Collections.singleton(defaultQualifier);
    }
View Full Code Here

    @SuppressWarnings("serial")
    public Set<Annotation> getQualifiers() {
        getQualifiersCalled = true;
        return new HashSet<Annotation>() {
            {
                add(new DefaultLiteral());
            }
        };
    }
View Full Code Here

        return type;
    }

    @Override
    public Set<Annotation> getQualifiers() {
        Annotation defaultQualifier = new DefaultLiteral();
        return Collections.singleton(defaultQualifier);
    }
View Full Code Here

TOP

Related Classes of org.jboss.cdi.tck.literals.DefaultLiteral

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.