Examples of BeansConfig


Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertEquals(1, provider.getValidationProblems().size());
  }

  @Test
  public void testStringFactoryInjection() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testStringTypeFactoryBean-context.xml", IBeansConfig.Type.MANUAL);
   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 554 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    }
  }

  @Test
  public void testUnknownFactoryInjectionWithoutSpecificExtension() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testUnknownTypeFactoryBean-context.xml", IBeansConfig.Type.MANUAL);
   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("unknownFactoryBean", new Integer[] { 580 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertEquals(0, references.size());
  }

  @Test
  public void testUnknownFactoryInjectionWithSpecificExtension() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testUnknownTypeFactoryBean-context.xml", IBeansConfig.Type.MANUAL);
   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("unknownFactoryBean", new Integer[] { 580 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    }
  }
 
  @Test
  public void testEnvironmentInjection() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testEnvironmentInjection-context.xml", IBeansConfig.Type.MANUAL);
   
    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("environment", new Integer[] { 591 });

    AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

  // assertTrue(hyperlinks.size() == 1);
  // }

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

    AutowireHyperlinkDetector detector = new AutowireHyperlinkDetector();
    Set<AutowireBeanHyperlink> hyperlinks = new HashSet<AutowireBeanHyperlink>();
    detector.addHyperlinksHelper(config, "test.beans.TestBean", project, hyperlinks);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertTrue(hyperlinks.size() == 2);
  }

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

    AutowireHyperlinkDetector detector = new AutowireHyperlinkDetector();
    Set<AutowireBeanHyperlink> hyperlinks = new HashSet<AutowireBeanHyperlink>();
    detector.addHyperlinksHelper(config, "int", project, hyperlinks);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    project.delete(true, null);
  }

  @Test
  public void testBasicConfigBeans() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "basic-bean-config.xml", IBeansConfig.Type.MANUAL);
   
    Set<IBean> beans = BeansModelUtils.getBeans(config);
    assertEquals(1, beans.size());

    IBean bean = beans.iterator().next();
    assertEquals("simpleBean", bean.getElementName());
   
    IModelElement[] children = config.getElementChildren();
    assertEquals(1, children.length);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertEquals(1, children.length);
  }

  @Test
  public void testAdvancedConfigBeans() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "advanced-bean-config.xml", IBeansConfig.Type.MANUAL);
   
    Set<IBean> beans = BeansModelUtils.getBeans(config);
    assertEquals(2, beans.size());

    assertNotNull(BeansModelUtils.getBean("simpleBean", config));
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertEquals("org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator", aspectjBean.getClassName());
  }

  @Test
  public void testBasicComponentScanning() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "basic-component-scanning.xml", IBeansConfig.Type.MANUAL);
   
    IBean bean = BeansModelUtils.getBean("simpleScannedBean", config);
    assertEquals("simpleScannedBean", bean.getElementName());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

    assertEquals("simpleScannedBean", bean.getElementName());
  }

  @Test
  public void testComponentScanningWithEnableAnnotations() throws Exception {
    BeansConfig config = new BeansConfig(beansProject, "advanced-component-scanning.xml", IBeansConfig.Type.MANUAL);
   
    IBean simpleBean = BeansModelUtils.getBean("simpleScannedBean", config);
    assertEquals("simpleScannedBean", simpleBean.getElementName());

    IBean bean = BeansModelUtils.getBean("advancedConfigurationClass", config);
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.