1 22 package org.jboss.ejb3.test.mail.unit; 23 24 import javax.naming.InitialContext ; 25 26 import org.jboss.test.JBossTestCase; 27 import junit.framework.Test; 28 29 import org.jboss.ejb3.test.mail.StatelessMail; 30 31 35 public class MailTestCase extends JBossTestCase 36 { 37 38 public MailTestCase(String name) 39 { 40 super(name); 41 } 42 43 public void test() throws Exception 44 { 45 InitialContext jndiContext = new InitialContext (); 46 StatelessMail bean = (StatelessMail)jndiContext.lookup("StatelessMail"); 47 assertNotNull(bean); 48 49 bean.testMail(); 50 bean.testMailInjection(); 51 } 52 53 54 public static Test suite() throws Exception 55 { 56 return getDeploySetup(MailTestCase.class, "mail-test.jar"); 57 } 58 59 } 60 | Popular Tags |