Search in sources :

Example 16 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingHsaEnhetsNamn.

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

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

the class QuestionAnswerValidatorTest method testQVCatchesInvalidPatientPersonIdRoot.

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

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingHsaEnhetIdExtension.

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

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingLakarutlatandeId.

@Test
public void testQVCatchesMissingLakarutlatandeId() {
    // Arrange
    ReceiveMedicalCertificateQuestionType request = createValidQuestionRequest();
    request.getQuestion().getLakarutlatande().setLakarutlatandeId(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 20 with ReceiveMedicalCertificateQuestionType

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

the class QuestionAnswerValidatorTest method testQVCatchesMissingPatientPersonFullstandigtNamn.

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

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