Skip to content

Commit

Permalink
MAT-7279 updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sb-prateekkeerthi committed Jul 3, 2024
1 parent 0f76070 commit ea7cf62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/main/java/gov/cms/madie/util/MappingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public static String getMeasureTypeId(BaseConfigurationTypes baseConfigurationTy
case INTERMEDIATE_CLINICAL_OUTCOME -> MadieConstants.MeasureType
.INTERMEDIATE_CLINICAL_OUTCOME;
case OUTCOME -> MadieConstants.MeasureType.OUTCOME;
case EXPERIENCE -> MadieConstants.MeasureType
.EXPERIENCE;
case EXPERIENCE -> MadieConstants.MeasureType.EXPERIENCE;
case PATIENT_REPORTED_OUTCOME_PERFORMANCE -> MadieConstants.MeasureType
.PATIENT_REPORTED_OUTCOME_PERFORMANCE;
case PROCESS -> MadieConstants.MeasureType.PROCESS;
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/gov/cms/madie/services/MeasureMapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,12 @@ void testBaseConfigurationTypesToTypesTypesEmpty() {
void testBaseConfigurationTypesToTypesTypes() {
TypesType output =
measureMapper.baseConfigurationTypesToTypesTypes(
List.of(BaseConfigurationTypes.PERFORMANCE, BaseConfigurationTypes.OUTCOME));
List.of(BaseConfigurationTypes.RESOURCE_USE, BaseConfigurationTypes.OUTCOME));
assertThat(output, is(notNullValue()));
assertThat(output.getType(), is(notNullValue()));
assertThat(
output.getType().get(0).getValue(), is(BaseConfigurationTypes.PERFORMANCE.toString()));
assertThat(output.getType().get(0).getId(), is(MadieConstants.MeasureType.PERFORMANCE));
output.getType().get(0).getValue(), is(BaseConfigurationTypes.RESOURCE_USE.toString()));
assertThat(output.getType().get(0).getId(), is(MadieConstants.MeasureType.RESOURCE_USE));
assertThat(output.getType().get(1).getValue(), is(BaseConfigurationTypes.OUTCOME.toString()));
assertThat(output.getType().get(1).getId(), is(MadieConstants.MeasureType.OUTCOME));
}
Expand Down
18 changes: 6 additions & 12 deletions src/test/java/gov/cms/madie/util/MappingUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ void getMeasureTypeIdAppropriate() {

@Test
void getMeasureTypeIdResource() {
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.COST_OR_RESOURCE_USE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.COST_OR_RESOURCE_USE)));
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.RESOURCE_USE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.RESOURCE_USE)));
}

@Test
Expand All @@ -78,22 +78,16 @@ void getMeasureTypeIdOutcome() {

@Test
void getMeasureTypeIdExperience() {
String output =
MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PATIENT_ENGAGEMENT_OR_EXPERIENCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PATIENT_ENGAGEMENT_OR_EXPERIENCE)));
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.EXPERIENCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.EXPERIENCE)));
}

@Test
void getMeasureTypeIdProPm() {
String output =
MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PATIENT_REPORTED_OUTCOME_PERFORMANCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PATIENT_REPORTED_OUTCOME)));
}

@Test
void getMeasureTypeIdPerformance() {
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PERFORMANCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PERFORMANCE)));
assertThat(
output, is(equalTo(MadieConstants.MeasureType.PATIENT_REPORTED_OUTCOME_PERFORMANCE)));
}

@Test
Expand Down

0 comments on commit ea7cf62

Please sign in to comment.