Search in sources :

Example 6 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 7 with FormattedErrorCode

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

the class FormattedErrorCodeTest method testEqualsDifferentClass.

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

Example 8 with FormattedErrorCode

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

the class FormattedErrorCodeTest method testToString.

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

Example 9 with FormattedErrorCode

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

the class FormattedErrorCodeTest method testHashCode.

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

Example 10 with FormattedErrorCode

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

the class FormattedErrorCodeTest method testEqualsNull.

@Test
void testEqualsNull() {
    FormattedErrorCode o1 = new FormattedErrorCode(ErrorCode.UNEXPECTED_ERROR, "Some Message");
    Truth.assertThat(o1).isNotEqualTo(null);
}
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