Search in sources :

Example 1 with Car

use of org.atinject.tck.auto.Car in project spring-framework by spring-projects.

the class SpringAtInjectTck method suite.

public static Test suite() {
    GenericApplicationContext ac = new GenericApplicationContext();
    AnnotatedBeanDefinitionReader bdr = new AnnotatedBeanDefinitionReader(ac);
    bdr.setScopeMetadataResolver(new Jsr330ScopeMetadataResolver());
    bdr.registerBean(Convertible.class);
    bdr.registerBean(DriversSeat.class, Drivers.class);
    bdr.registerBean(Seat.class, Primary.class);
    bdr.registerBean(V8Engine.class);
    bdr.registerBean(SpareTire.class, "spare");
    bdr.registerBean(Cupholder.class);
    bdr.registerBean(Tire.class, Primary.class);
    bdr.registerBean(FuelTank.class);
    ac.refresh();
    Car car = ac.getBean(Car.class);
    return Tck.testsFor(car, false, true);
}
Also used : GenericApplicationContext(org.springframework.context.support.GenericApplicationContext) Car(org.atinject.tck.auto.Car) Jsr330ScopeMetadataResolver(org.springframework.context.annotation.Jsr330ScopeMetadataResolver) AnnotatedBeanDefinitionReader(org.springframework.context.annotation.AnnotatedBeanDefinitionReader)

Aggregations

Car (org.atinject.tck.auto.Car)1 AnnotatedBeanDefinitionReader (org.springframework.context.annotation.AnnotatedBeanDefinitionReader)1 Jsr330ScopeMetadataResolver (org.springframework.context.annotation.Jsr330ScopeMetadataResolver)1 GenericApplicationContext (org.springframework.context.support.GenericApplicationContext)1