Package org.springframework.ide.eclipse.beans.core.internal.model

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


    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

    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

    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

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

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

    IBean configClassBean = BeansModelUtils.getBean("profileConfigurationClass", config);
View Full Code Here

    project.delete(true, null);
  }

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

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 70 });
    allowedRefs.put("testBean2", new Integer[] { 110 });
View Full Code Here

    }
  }

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

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 70 });
    allowedRefs.put("testBean2", new Integer[] { 143 });
    allowedRefs.put("testBean3", new Integer[] { 148 });
View Full Code Here

    }
  }

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

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 70 });
    allowedRefs.put("testBean3", new Integer[] { 148 });
    allowedRefs.put("testBean4", new Integer[] { 130 });
View Full Code Here

    }
  }

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

    Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
    allowedRefs.put("testBean", new Integer[] { 70 });
    allowedRefs.put("testBean2", new Integer[] { 196 });
    allowedRefs.put("testBean3", new Integer[] { 201 });
View Full Code Here

    BeansCorePlugin.setModel(modelBackup);
  }

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

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

TOP

Related Classes of org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig

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.