1 25 package org.objectweb.easybeans.tests.environment.reference.simpleentry; 26 27 import static org.objectweb.easybeans.tests.common.enhancer.ClassesEnhancer.EXT_CLASS; 28 import static org.objectweb.easybeans.tests.common.enhancer.ClassesEnhancer.enhanceNewClassLoader; 29 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 30 31 import java.io.File ; 32 import java.util.ArrayList ; 33 import java.util.List ; 34 35 import org.objectweb.easybeans.tests.common.ejbs.base.ItfOneMethod01; 36 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry; 37 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.SLSBSimpleEnvEntryMethodInjection00; 38 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry.wrongspecification.SLSBStaticMethodEntry; 39 import org.objectweb.easybeans.tests.common.enhancer.ClassesEnhancer.TYPE; 40 import org.testng.annotations.BeforeMethod; 41 import org.testng.annotations.Test; 42 43 54 public class TestSimpleEnvironmentEntryMethodInjection { 55 56 59 private ItfSimpleEnvEntry bean; 60 61 62 66 @BeforeMethod 67 public void startUp() throws Exception { 68 bean = getBeanRemoteInstance(SLSBSimpleEnvEntryMethodInjection00.class, ItfSimpleEnvEntry.class); 69 70 } 71 72 77 @Test 78 public void testString00() { 79 bean.checkString00(); 80 } 81 82 87 @Test 88 public void testCharacter00() { 89 bean.checkCharacter00(); 90 } 91 92 97 @Test 98 public void testInteger00() { 99 bean.checkInteger00(); 100 } 101 102 107 @Test 108 public void testBoolean00() { 109 bean.checkBoolean00(); 110 } 111 112 117 @Test 118 public void testDouble00() { 119 bean.checkDouble00(); 120 } 121 122 127 @Test 128 public void testByte00() { 129 bean.checkByte00(); 130 } 131 132 137 @Test 138 public void testShort00() { 139 bean.checkByte00(); 140 } 141 142 147 @Test 148 public void testLong00() { 149 bean.checkLong00(); 150 } 151 152 157 @Test 158 public void testFloat00() { 159 bean.checkFloat00(); 160 } 161 162 169 @Test(groups = {"withWrongSpecification"}, expectedExceptions = IllegalStateException .class) 170 public void testWrongSpec00() throws Exception { 171 List <String > lstFiles = new ArrayList <String >(); 172 173 lstFiles.add(ItfOneMethod01.class.getName().replace(".", File.separator) + EXT_CLASS); 174 lstFiles.add(SLSBStaticMethodEntry.class.getName().replace(".", File.separator) + EXT_CLASS); 175 enhanceNewClassLoader(lstFiles, TYPE.ALL); 176 } 177 } 178 | Popular Tags |