Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Print test file
run: cat src/test/java/io/github/isagroup/PricingEvaluatorUtilTests.java

- name: Build with Maven
run: mvn test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.isagroup;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.jupiter.api.BeforeEach;
Expand All @@ -18,6 +19,7 @@ public class PricingEvaluatorUtilTests {
private static final String JWT_EXPRESSION_TEST = "userContext['pets']*4 < planContext['usageLimits']['pets']";

private static final String USER_PLAN = "ADVANCED";
private static final List<String> USER_ADDONS = List.of("addOnFeature", "extraPets");
private static final String YAML_CONFIG_PATH = "pricing/petclinic.yml";

private PricingContext pricingContext;
Expand All @@ -39,6 +41,7 @@ public void setUp() {
pricingContext.setJwtSecret(JWT_SECRET_TEST);
pricingContext.setUserContext(userContext);
pricingContext.setUserPlan(USER_PLAN);
pricingContext.setUserAddOns(USER_ADDONS);
pricingContext.setConfigFilePath(YAML_CONFIG_PATH);

this.pricingContext = pricingContext;
Expand Down
Loading