JAVA-12424 Renamed spring-ejb to spring-ejb-modules
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
package com.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.springejbclient.SpringEjbClientApplication;
|
||||
|
||||
/**
|
||||
* This Live Test requires:
|
||||
* * run the `spring-ejb-remote` module with the following command: `mvn clean package cargo:run -Pwildfly-standalone`
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringEjbClientApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* This Live Test requires:
|
||||
* * run the `spring-ejb-remote` module with the following command: `mvn clean package cargo:run -Pwildfly-standalone`
|
||||
*
|
||||
*/
|
||||
public class EJBSetupLiveTest {
|
||||
|
||||
@Test
|
||||
public void EJBClientTest() {
|
||||
EJBClient ejbClient = new EJBClient();
|
||||
HelloWorldBean bean = new HelloWorldBean();
|
||||
assertEquals(bean.getHelloWorld(), ejbClient.getEJBRemoteMessage());
|
||||
}
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* This Live Test requires:
|
||||
* * run the `spring-ejb-remote` module with the following command: `mvn clean package cargo:run -Pwildfly-standalone`
|
||||
*
|
||||
*/
|
||||
public class TextApplicationLiveTest {
|
||||
|
||||
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[]{});
|
||||
assertTrue(outContent.toString().contains("SAMPLE TEXT"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user