1 25 package org.objectweb.easybeans.tests.inheritance; 26 27 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimplePrintMessage; 28 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.inheritance.SFSBInheritanceTest00; 29 import org.objectweb.easybeans.tests.common.helper.EJBHelper; 30 import org.testng.annotations.BeforeClass; 31 import org.testng.annotations.Test; 32 33 45 public class TestInheritance { 46 47 50 private ItfSimplePrintMessage sfsbMessage; 51 52 55 private static final String MESSAGE_1 = "Test says Hello World"; 56 57 60 private static final String MESSAGE_2 = "The bean works well"; 61 62 66 @BeforeClass 67 public void setup() throws Exception { 68 ItfSimplePrintMessage sfsbPrint = EJBHelper.getBeanRemoteInstance(SFSBInheritanceTest00.class, 70 ItfSimplePrintMessage.class); 71 sfsbMessage = sfsbPrint; 72 } 73 74 79 @Test(groups = {"startup"}) 80 public void callStartupWithOneParameterTest() { 81 sfsbMessage.startup(MESSAGE_1); 82 } 83 84 89 @Test(groups = {"startup"}) 90 public void callStartupWithTwoParametersTest() { 91 sfsbMessage.startup(MESSAGE_1, MESSAGE_2); 92 } 93 94 100 @Test(groups = {"callMesssage"}, dependsOnMethods = "callStartupWithOneParameterTest") 101 public void callMessageWithOneParameterTest() { 102 assert sfsbMessage.getMessage().equals(MESSAGE_1); 103 } 104 105 111 @Test(groups = {"callMesssage"}, dependsOnMethods = "callStartupWithTwoParametersTest") 112 public void callMessageWithTwoParametersTest() { 113 assert sfsbMessage.getMessage().equals(MESSAGE_1 + MESSAGE_2); 114 } 115 116 } 117 | Popular Tags |