forked from hantsy/spring-reactive-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
91 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
boot-data-r2dbc-mssql/src/test/java/com/example/demo/IntegrationTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.example.demo; | ||
|
||
|
||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.web.server.LocalServerPort; | ||
import org.springframework.test.web.reactive.server.WebTestClient; | ||
|
||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | ||
public class IntegrationTests { | ||
|
||
@LocalServerPort | ||
int port; | ||
WebTestClient webClient; | ||
|
||
@BeforeAll | ||
public void setup() { | ||
this.webClient = WebTestClient.bindToServer() | ||
.baseUrl("http://localhost:" + this.port) | ||
.build(); | ||
} | ||
|
||
@Test | ||
public void willLoadPosts() { | ||
this.webClient.get().uri("/posts") | ||
.exchange() | ||
.expectStatus().is2xxSuccessful() | ||
.expectBodyList(Post.class).hasSize(1); | ||
} | ||
|
||
} | ||
|
1 change: 1 addition & 0 deletions
1
boot-data-r2dbc-mssql/src/test/resources/junit-platform.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
junit.jupiter.testinstance.lifecycle.default = per_class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
boot-data-r2dbc-mysql/src/test/java/com/example/demo/DemoApplicationTests.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
boot-data-r2dbc-mysql/src/test/resources/junit-platform.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
junit.jupiter.testinstance.lifecycle.default = per_class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
boot-data-r2dbc-postgresql/src/test/java/com/example/demo/PostRepositoryTest.java
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
boot-data-r2dbc-postgresql/src/test/resources/junit-platform.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
junit.jupiter.testinstance.lifecycle.default = per_class |
File renamed without changes.
1 change: 0 additions & 1 deletion
1
boot-r2dbc/src/test/java/com/example/demo/IntegrationTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters