-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Koufan-De-King-patch-1
- Loading branch information
Showing
7 changed files
with
62 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ target/ | |
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
.idea/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
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
13 changes: 13 additions & 0 deletions
13
...ne-banking-service/src/main/java/com/adorsys/webank/obs/controller/OBSRestController.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,13 @@ | ||
package com.adorsys.webank.obs.controller; | ||
|
||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class OBSRestController { | ||
|
||
@GetMapping("/message") | ||
public String getMessage() { | ||
return "Hello from OBService!"; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
online-banking-service/src/main/java/com/adorsys/webank/obs/service/api/OBServiceAPI.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,6 @@ | ||
package com.adorsys.webank.obs.service.api; | ||
|
||
|
||
public interface OBServiceAPI { | ||
String getMessage(); | ||
} |
13 changes: 13 additions & 0 deletions
13
online-banking-service/src/main/java/com/adorsys/webank/obs/service/impl/OBServiceImpl.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,13 @@ | ||
package com.adorsys.webank.obs.service.impl; | ||
|
||
import com.adorsys.webank.obs.service.api.OBServiceAPI; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class OBServiceImpl implements OBServiceAPI { | ||
|
||
@Override | ||
public String getMessage() { | ||
return "Hello from OBService!"; | ||
} | ||
} |
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
23 changes: 23 additions & 0 deletions
23
...anking-service/src/test/java/com/adorsys/webank/obs/controller/OBSRestControllerTest.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,23 @@ | ||
package com.adorsys.webank.obs.controller; | ||
|
||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; | ||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers; | ||
|
||
@WebMvcTest(OBSRestController.class) | ||
public class OBSRestControllerTest { | ||
|
||
@Autowired | ||
private MockMvc mockMvc; | ||
|
||
@Test | ||
public void testGetMessage() throws Exception { | ||
mockMvc.perform(MockMvcRequestBuilders.get("/message")) | ||
.andExpect(MockMvcResultMatchers.status().isOk()) | ||
.andExpect(MockMvcResultMatchers.content().string("Hello from OBService!")); | ||
} | ||
} |