BAEL-8874 Merge ejb projects

-Merged ejb and spring-ejb modules into spring-ejb
This commit is contained in:
Dhawal Kapil
2018-11-13 19:45:52 +05:30
parent aa99f4afa8
commit 93f505f9a9
63 changed files with 91 additions and 372 deletions
@@ -0,0 +1,18 @@
package com.baeldung.ejb.setup.test;
import com.baeldung.ejb.client.EJBClient;
import com.baeldung.ejb.tutorial.HelloWorldBean;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class EJBSetupIntegrationTest {
@Test
public void EJBClientTest() {
EJBClient ejbClient = new EJBClient();
HelloWorldBean bean = new HelloWorldBean();
assertEquals(bean.getHelloWorld(), ejbClient.getEJBRemoteMessage());
}
}
@@ -0,0 +1,31 @@
package com.baeldung.ejb.wildfly;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import javax.naming.NamingException;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import static org.junit.Assert.*;
public class TextApplicationIntegrationTest {
private static ByteArrayOutputStream outContent;
@BeforeClass
public static void setUpPrintStreamInstance() {
outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
}
@AfterClass
public static void tearDownByteArrayOutputStream() {
outContent = null;
}
@Test
public void givenInputString_whenCompareTtoStringPrintedToConsole_thenSuccessful() throws NamingException {
TextApplication.main(new String[]{});
assertEquals("SAMPLE TEXT", outContent.toString());
}
}