Package org.apache.openejb.junit.jee.resources

Examples of org.apache.openejb.junit.jee.resources.TestResource


    public void evaluate() throws Throwable {
        if (startingStatement != null) {
            Class<?> clazz = this.clazz;
            while (!Object.class.equals(clazz)) {
                for (final Field field : clazz.getDeclaredFields()) {
                    final TestResource resource = field.getAnnotation(TestResource.class);
                    if (resource != null) {
                        if (Context.class.isAssignableFrom(field.getType())) {
                            field.setAccessible(true);
                            field.set(Modifier.isStatic(field.getModifiers()) ? null : test, startingStatement.getContainer().getContext());
                        } else if (Hashtable.class.isAssignableFrom(field.getType())) {
View Full Code Here


        @Override
        public void evaluate() throws Throwable {
            Class<?> clazz = test.getClass();
            while (!Object.class.equals(clazz)) {
                for (Field field : clazz.getDeclaredFields()) {
                    final TestResource resource = field.getAnnotation(TestResource.class);
                    if (resource != null) {
                        if (Context.class.isAssignableFrom(field.getType())) {
                            field.setAccessible(true);
                            field.set(test, container.getContext());
                        } else if (Hashtable.class.isAssignableFrom(field.getType())) {
View Full Code Here

TOP

Related Classes of org.apache.openejb.junit.jee.resources.TestResource

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.