Skip to content

Commit

Permalink
Affected Issue(s): #611
Browse files Browse the repository at this point in the history
What this commit has achieved:
1. Added Integration Test for future-proof
  • Loading branch information
muhammad-levi committed Dec 1, 2023
1 parent 169c2a3 commit 7d5262f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/test/java/ca/uhn/fhir/jpa/starter/MdmTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package ca.uhn.fhir.jpa.starter;

import static org.assertj.core.api.Assertions.assertThat;

import org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.nickname.INicknameSvc;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {Application.class}, properties = {
"hapi.fhir.fhir_version=r4",
"hapi.fhir.mdm_enabled=true"
})
class MdmTest {
@Autowired
INicknameSvc nicknameService;

@Autowired
JpaStorageSettings jpaStorageSettings;

@Test
void testApplicationStartedSuccessfully() {
assertThat(nicknameService).isNotNull();
assertThat(jpaStorageSettings.getSupportedSubscriptionTypes()).contains(SubscriptionChannelType.MESSAGE);
}
}

0 comments on commit 7d5262f

Please sign in to comment.