Search in sources :

Example 1 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingVardgivarNamn.

@Test
public void testQVCatchesMissingVardgivarNamn() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getAdressVard().getHosPersonal().getEnhet().getVardgivare().setVardgivarnamn(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 2 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingPatientPersonIdExtension.

@Test
public void testQVCatchesMissingPatientPersonIdExtension() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getLakarutlatande().getPatient().getPersonId().setExtension(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 3 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesInvalidVardgivarIdRoot.

@Test
public void testQVCatchesInvalidVardgivarIdRoot() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getAdressVard().getHosPersonal().getEnhet().getVardgivare().getVardgivareId().setRoot("INVALID");
    // 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 4 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingHsaPersonFullstandigtNamn.

@Test
public void testQVCatchesMissingHsaPersonFullstandigtNamn() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getAdressVard().getHosPersonal().setFullstandigtNamn(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 5 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesInvalidHsaEnhetIdRoot.

@Test
public void testQVCatchesInvalidHsaEnhetIdRoot() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getAdressVard().getHosPersonal().getEnhet().getEnhetsId().setRoot("INVALID");
    // 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