Skip to content

Commit

Permalink
adds IntegrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli authored Jan 11, 2024
1 parent e9ffb81 commit e8ebd5e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ executors:
platform: "linux/amd64"
jobs:
gradle_integration_test:
executor: machine_executor_amd64
# executor: machine_executor_amd64
executor: jdk
steps:
- checkout # Checkout your source code
- restore_cache:
Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",

"image": "mcr.microsoft.com/devcontainers/java:21",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.learning.mfscreener.web.controllers;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import com.learning.mfscreener.common.AbstractIntegrationTest;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;

class XIRRCalculatorControllerIntTest extends AbstractIntegrationTest {

@Test
void getXIRR() throws Exception {
this.mockMvc
.perform(get("/api/xirr/{pan}", "ABCDE1234F").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
}
}

0 comments on commit e8ebd5e

Please sign in to comment.