Examples of resolveAutowiredDependencies()


Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 504 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    IBean bean = BeansModelUtils.getBean("customBean", config);

    assertEquals(1, references.size());
    assertTrue(references.containsKey(bean));
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

  @Test
  public void testCustomAnnotationOptionalMethodResourceInjectionWhenNoDependencyFound() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testCustomAnnotationOptionalMethodResourceInjectionWhenNoDependencyFound-context.xml", IBeansConfig.Type.MANUAL);

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    assertEquals(0, references.size());

    assertEquals(0, provider.getValidationProblems().size());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

  @Test
  public void testCustomAnnotationOptionalMethodResourceInjectionWhenMultipleDependenciesFound() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testCustomAnnotationOptionalMethodResourceInjectionWhenMultipleDependenciesFound-context.xml", IBeansConfig.Type.MANUAL);

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    assertEquals(0, references.size());

    assertEquals(1, provider.getValidationProblems().size());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 554 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    IBean bean = BeansModelUtils.getBean("annotatedBean", config);

    assertEquals(1, references.size());
    assertTrue(references.containsKey(bean));
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("unknownFactoryBean", new Integer[] { 580 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    FactoryBeanTypeResolverExtensions.setFactoryBeanTypeResolvers(new IFactoryBeanTypeResolver[0]);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    assertEquals(0, references.size());
  }

  @Test
  public void testUnknownFactoryInjectionWithSpecificExtension() throws Exception {
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

        return null;
      }
    };
    FactoryBeanTypeResolverExtensions.setFactoryBeanTypeResolvers(new IFactoryBeanTypeResolver[] {testFactoryBeanTypeResolver});

    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    IBean bean = BeansModelUtils.getBean("autowiredBeanWithUnknownType", config);

    assertEquals(1, references.size());
    assertTrue(references.containsKey(bean));
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("environment", new Integer[] { 591 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
    Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
    IBean bean = BeansModelUtils.getBean("environmentAutowiredBean", config);

//    assertTrue(references.size() == 1);
//    assertTrue(references.containsKey(bean));
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.autowire.internal.provider.AutowireDependencyProvider.resolveAutowiredDependencies()

    IBeansModel model = BeansCorePlugin.getModel();
    IBeansProject springProject = model.getProject(cu.getJavaProject().getProject());
    Set<IBeansConfig> configs = springProject.getConfigs();
    for (IBeansConfig config : configs) {
      AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
      provider.resolveAutowiredDependencies();
      List<ValidationProblem> problems = provider.getValidationProblems();
      for (ValidationProblem problem : problems) {
        ValidationProblemAttribute[] problemAttributes = problem.getAttributes();
        boolean matched = false;
        BodyDeclaration problemDecl = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.