Package example.scannable

Examples of example.scannable.FooServiceImpl


    assertTrue(context.containsBean(AnnotationConfigUtils.CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME));
    assertTrue(context.containsBean(AnnotationConfigUtils.AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME));
    assertTrue(context.containsBean(AnnotationConfigUtils.REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME));
    assertTrue(context.containsBean(AnnotationConfigUtils.COMMON_ANNOTATION_PROCESSOR_BEAN_NAME));
    context.refresh();
    FooServiceImpl service = context.getBean("fooServiceImpl", FooServiceImpl.class);
    assertTrue(context.getDefaultListableBeanFactory().containsSingleton("myNamedComponent"));
    assertEquals("bar", service.foo(1));
    assertTrue(context.isPrototype("thoreau"));
  }
View Full Code Here


    assertTrue(context.containsBean("myNamedDao"));
    assertTrue(context.containsBean("otherFooDao"));
    context.refresh();
    assertFalse(context.getBeanFactory().containsSingleton("otherFooDao"));
    assertFalse(context.getBeanFactory().containsSingleton("fooServiceImpl"));
    FooServiceImpl service = context.getBean("fooServiceImpl", FooServiceImpl.class);
    assertTrue(context.getBeanFactory().containsSingleton("otherFooDao"));
    assertEquals("other", service.foo(1));
  }
View Full Code Here

    scanner.setBeanNameGenerator(new TestBeanNameGenerator());
    int beanCount = scanner.scan(BASE_PACKAGE);
    assertEquals(10, beanCount);
    context.refresh();

    FooServiceImpl fooService = context.getBean("fooService", FooServiceImpl.class);
    StaticListableBeanFactory myBf = (StaticListableBeanFactory) context.getBean("myBf");
    MessageSource ms = (MessageSource) context.getBean("messageSource");
    assertTrue(fooService.isInitCalled());
    assertEquals("bar", fooService.foo(123));
    assertSame(context.getDefaultListableBeanFactory(), fooService.beanFactory);
    assertEquals(2, fooService.listableBeanFactory.size());
    assertSame(context.getDefaultListableBeanFactory(), fooService.listableBeanFactory.get(0));
    assertSame(myBf, fooService.listableBeanFactory.get(1));
    assertSame(context, fooService.resourceLoader);
View Full Code Here

TOP

Related Classes of example.scannable.FooServiceImpl

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.