BAEL-8874 Merge ejb projects
-Merged ejb and spring-ejb modules into spring-ejb
This commit is contained in:
+18
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user