Search in sources :

Example 21 with ReceiveMedicalCertificateQuestionType

use of se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionType in project webcert by sklintyg.

the class QuestionAnswerValidatorTest method testQVCatchesMissingFraga.

@Test
public void testQVCatchesMissingFraga() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().setFraga(null);
    // Act
    final List<String> result = QuestionAnswerValidator.validate(request);
    // Assert
    assertEquals(1, result.size());
}
Also used : ReceiveMedicalCertificateQuestionType(se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionType) Test(org.junit.Test)

Example 22 with ReceiveMedicalCertificateQuestionType

use of se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionType in project webcert by sklintyg.

the class QuestionAnswerValidatorTest method testQVCatchesMissingAmne.

@Test
public void testQVCatchesMissingAmne() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().setAmne(null);
    // Act
    final List<String> result = QuestionAnswerValidator.validate(request);
    // Assert
    assertEquals(1, result.size());
}
Also used : ReceiveMedicalCertificateQuestionType(se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionType) Test(org.junit.Test)

Aggregations

ReceiveMedicalCertificateQuestionType (se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionType)21 Test (org.junit.Test)19 ReceiveMedicalCertificateQuestionResponseType (se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.ReceiveMedicalCertificateQuestionResponseType)3 QuestionFromFkType (se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.QuestionFromFkType)2 JAXBContext (javax.xml.bind.JAXBContext)1 Unmarshaller (javax.xml.bind.Unmarshaller)1 StreamSource (javax.xml.transform.stream.StreamSource)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1 FragaSvar (se.inera.intyg.webcert.persistence.fragasvar.model.FragaSvar)1