[Java 11503] (#12626)
* [JAVA-11503] Created new vertx-modules * [JAVA-11503] Moved vertx(sub-module) to vertx-modules(parent) * [JAVA-11503] Moved spring-vertx(sub-module) to vertx-modules(parent) * [JAVA-11503] Moved vertx-and-java(sub-module) to vertx-modules(parent) * [JAVA-11503] deleted modules that were moved Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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.vertxspring.VertxSpringApplication;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = VertxSpringApplication.class)
|
||||
public class SpringContextTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.baeldung.vertxspring;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("test")
|
||||
public class VertxSpringApplicationIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private Integer port;
|
||||
|
||||
private TestRestTemplate restTemplate = new TestRestTemplate();
|
||||
|
||||
@Test
|
||||
public void givenUrl_whenReceivedArticles_thenSuccess() throws InterruptedException {
|
||||
ResponseEntity<String> responseEntity = restTemplate
|
||||
.getForEntity("http://localhost:" + port + "/api/baeldung/articles", String.class);
|
||||
|
||||
assertEquals(200, responseEntity.getStatusCodeValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user