Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.AnnotationProvider


    public void found_later_match()
    {
        ObjectProvider prov1 = mockObjectProvider();
        ObjectProvider prov2 = mockObjectProvider();
        Class type = Runnable.class;
        AnnotationProvider ap = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        Object expected = mockRunnable();

        train_provide(prov1, type, ap, locator, null);
        train_provide(prov2, type, ap, locator, expected);
View Full Code Here


    public void no_match_but_optional()
    {
        ObjectProvider prov1 = mockObjectProvider();
        ObjectProvider prov2 = mockObjectProvider();
        Class type = Runnable.class;
        AnnotationProvider ap = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();

        train_provide(prov1, type, ap, locator, null);
        train_provide(prov2, type, ap, locator, null);
View Full Code Here

    public void no_match_and_required()
    {
        ObjectProvider prov1 = mockObjectProvider();
        ObjectProvider prov2 = mockObjectProvider();
        Class type = Runnable.class;
        AnnotationProvider ap = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        Object expected = mockRunnable();

        train_provide(prov1, type, ap, locator, null);
        train_provide(prov2, type, ap, locator, null);
View Full Code Here

    @SuppressWarnings("unchecked")
    public boolean provideInjection(final String fieldName, Class fieldType, ObjectLocator locator,
                                    final ClassTransformation transformation, MutableComponentModel componentModel)
    {
        AnnotationProvider annotationProvider = new AnnotationProvider()
        {
            public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
            {
                return transformation.getFieldAnnotation(fieldName, annotationClass);
            }
View Full Code Here

        ValidationConstraintGenerator gen = mockValidationConstraintGenerator();
        FieldValidator fv1 = mockFieldValidator();
        FieldValidator fv2 = mockFieldValidator();
        FieldValidatorSource source = mockFieldValidatorSource();
        Class propertyType = Integer.class;
        AnnotationProvider provider = mockAnnotationProvider();
        String overrideId = "overrideId";
        Messages overrideMessages = mockMessages();
        Field field = mockField();
        Locale locale = Locale.ENGLISH;
        String value = "*VALUE*";
 
View Full Code Here

    {
        ValidationConstraintGenerator gen = mockValidationConstraintGenerator();
        FieldValidator fv = mockFieldValidator();
        FieldValidatorSource source = mockFieldValidatorSource();
        Class propertyType = Integer.class;
        AnnotationProvider provider = mockAnnotationProvider();
        String overrideId = "overrideId";
        Messages overrideMessages = mockMessages();
        Field field = mockField();
        Locale locale = Locale.ENGLISH;
View Full Code Here

    public void no_validators_at_all() throws Exception
    {
        ValidationConstraintGenerator gen = mockValidationConstraintGenerator();
        FieldValidatorSource source = mockFieldValidatorSource();
        Class propertyType = Integer.class;
        AnnotationProvider provider = mockAnnotationProvider();
        String overrideId = "overrideId";
        Messages overrideMessages = mockMessages();
        Field field = mockField();
        Locale locale = Locale.ENGLISH;
        String value = "*VALUE*";
 
View Full Code Here

    @Test
    public void no_value_annotation()
    {
        SymbolSource symbolSource = mockSymbolSource();
        TypeCoercer coercer = mockTypeCoercer();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();

        train_getAnnotation(annotationProvider, Value.class, null);

        replay();
View Full Code Here

    @Test
    public void value_annotation_present()
    {
        SymbolSource symbolSource = mockSymbolSource();
        TypeCoercer coercer = mockTypeCoercer();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        String annotationValue = "${foo}";
        String expanded = "Foo";
        Runnable coerced = mockRunnable();
        Value annotation = newValue(annotationValue);
View Full Code Here

    @Test
    public void intermediate_type()
    {
        SymbolSource symbolSource = mockSymbolSource();
        TypeCoercer coercer = mockTypeCoercer();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        String annotationValue = "${foo}";
        String expanded = "Foo";
        Runnable coerced = mockRunnable();
        Value annotation = newValue(annotationValue);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.AnnotationProvider

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.