Commit 0578baa4 authored by abbenhoumi's avatar abbenhoumi

Update src/test/java/isima/F2/RamassagePoubleDepotApplicationTests.java

parent 7eb6732c
Pipeline #5962 failed with stages
in 56 seconds
...@@ -3,14 +3,20 @@ package isima.F2; ...@@ -3,14 +3,20 @@ package isima.F2;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort; import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
@DataJpaTest
class RamassagePoubleDepotApplicationTests { class RamassagePoubleDepotApplicationTests {
@LocalServerPort @LocalServerPort
...@@ -21,7 +27,6 @@ class RamassagePoubleDepotApplicationTests { ...@@ -21,7 +27,6 @@ class RamassagePoubleDepotApplicationTests {
@Test @Test
public void testRunServerRamassageAppTest() throws Exception { public void testRunServerRamassageAppTest() throws Exception {
assertThat(this.restTemplate.getForObject("http://localhost:" + port + "/", assertThat(this.restTemplate.getForObject("http://localhost:" + port + "/",
String.class)).isEmpty(); String.class)).isEmpty();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment