Skip to content

Commit 6104eff

Browse files
committed
MAT-10263 add tests
1 parent 319f5a0 commit 6104eff

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/test/java/gov/cms/madie/madiefhirservice/services/ResourceValidationServiceTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.mockito.Mockito;
2828
import org.mockito.Spy;
2929
import org.mockito.junit.jupiter.MockitoExtension;
30+
import org.springframework.test.util.ReflectionTestUtils;
3031

3132
import java.util.List;
3233
import java.util.Set;
@@ -672,6 +673,20 @@ void testValidateBundleReferencesForExecutionReportsCarePlanNestedReferencePath(
672673
+ "reference that do not resolve within the bundle.\n\n- activity.detail.performer"));
673674
}
674675

676+
@Test
677+
void testAppendAttributePath() {
678+
assertThat(
679+
ReflectionTestUtils.invokeMethod(validationService, "appendAttributePath", "", "performer"),
680+
is(equalTo("performer")));
681+
assertThat(
682+
ReflectionTestUtils.invokeMethod(validationService, "appendAttributePath", "activity", ""),
683+
is(equalTo("activity")));
684+
assertThat(
685+
ReflectionTestUtils.invokeMethod(
686+
validationService, "appendAttributePath", "activity.detail", "performer"),
687+
is(equalTo("activity.detail.performer")));
688+
}
689+
675690
@Test
676691
void testValidateBundleWithNullBundleThrowsException() {
677692
// Act & Assert

0 commit comments

Comments
 (0)