Search in sources :

Example 1 with FormattedErrorCode

use of gov.cms.qpp.conversion.model.error.FormattedErrorCode in project qpp-conversion-tool by CMSgov.

the class QualityMeasureSectionValidatorTest method duplicateEcqMeasureLevelUp.

@Test
void duplicateEcqMeasureLevelUp() {
    String xpath = manipulatorHandler.getCannedPath(MarkupManipulationHandler.CannedPath.ECQM_PARENT);
    List<Detail> errorDetails = manipulatorHandler.executeScenario(xpath, false);
    assertThat(errorDetails).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(new FormattedErrorCode(ErrorCode.MEASURE_GUID_MISSING, ErrorCode.MEASURE_GUID_MISSING.getMessage()));
}
Also used : FormattedErrorCode(gov.cms.qpp.conversion.model.error.FormattedErrorCode) Detail(gov.cms.qpp.conversion.model.error.Detail) Test(org.junit.jupiter.api.Test)

Example 2 with FormattedErrorCode

use of gov.cms.qpp.conversion.model.error.FormattedErrorCode in project qpp-conversion-tool by CMSgov.

the class FormattedErrorCodeTest method testGetErrorCode.

@Test
void testGetErrorCode() {
    FormattedErrorCode o1 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    Truth.assertThat(o1.getErrorCode()).isEqualTo(ErrorCode.UNEXPECTED_ERROR);
}
Also used : FormattedErrorCode(gov.cms.qpp.conversion.model.error.FormattedErrorCode) Test(org.junit.jupiter.api.Test)

Example 3 with FormattedErrorCode

use of gov.cms.qpp.conversion.model.error.FormattedErrorCode in project qpp-conversion-tool by CMSgov.

the class FormattedErrorCodeTest method testEqualsSelf.

@Test
void testEqualsSelf() {
    FormattedErrorCode o1 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    FormattedErrorCode o2 = o1;
    Truth.assertThat(o1).isEqualTo(o2);
}
Also used : FormattedErrorCode(gov.cms.qpp.conversion.model.error.FormattedErrorCode) Test(org.junit.jupiter.api.Test)

Example 4 with FormattedErrorCode

use of gov.cms.qpp.conversion.model.error.FormattedErrorCode in project qpp-conversion-tool by CMSgov.

the class FormattedErrorCodeTest method testEqualsDifferentMessage.

@Test
void testEqualsDifferentMessage() {
    FormattedErrorCode o1 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    FormattedErrorCode o2 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Other Message");
    Truth.assertThat(o1).isNotEqualTo(o2);
}
Also used : FormattedErrorCode(gov.cms.qpp.conversion.model.error.FormattedErrorCode) Test(org.junit.jupiter.api.Test)

Example 5 with FormattedErrorCode

use of gov.cms.qpp.conversion.model.error.FormattedErrorCode in project qpp-conversion-tool by CMSgov.

the class FormattedErrorCodeTest method testEquals.

@Test
void testEquals() {
    FormattedErrorCode o1 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    FormattedErrorCode o2 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    Truth.assertThat(o1).isEqualTo(o2);
}
Also used : FormattedErrorCode(gov.cms.qpp.conversion.model.error.FormattedErrorCode) Test(org.junit.jupiter.api.Test)

Aggregations

FormattedErrorCode (gov.cms.qpp.conversion.model.error.FormattedErrorCode)14 Test (org.junit.jupiter.api.Test)13 Detail (gov.cms.qpp.conversion.model.error.Detail)3 ComponentKey (gov.cms.qpp.conversion.model.ComponentKey)1 Node (gov.cms.qpp.conversion.model.Node)1 AllErrors (gov.cms.qpp.conversion.model.error.AllErrors)1 TransformException (gov.cms.qpp.conversion.model.error.TransformException)1 QrdaValidator (gov.cms.qpp.conversion.validate.QrdaValidator)1 Path (java.nio.file.Path)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1