use of se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.QuestionFromFkType in project webcert by sklintyg.
the class FKQuestionConverterTest method inflateQuestionFromFK.
private QuestionFromFkType inflateQuestionFromFK() throws Exception {
JAXBContext jaxbContext = JAXBContext.newInstance(QuestionFromFkType.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return unmarshaller.unmarshal(new StreamSource(new ClassPathResource("FragaSvarConverterTest/question.xml").getInputStream()), QuestionFromFkType.class).getValue();
}
use of se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.QuestionFromFkType in project webcert by sklintyg.
the class ReceiveQuestionResponderImplTest method createRequest.
private ReceiveMedicalCertificateQuestionType createRequest(String questionFile) {
ReceiveMedicalCertificateQuestionType request = new ReceiveMedicalCertificateQuestionType();
QuestionFromFkType question = inflateQuestion(questionFile);
if (question == null) {
throw new RuntimeException("Could not inflate file");
}
request.setQuestion(question);
return request;
}
use of se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.QuestionFromFkType in project webcert by sklintyg.
the class QuestionAnswerValidatorTest method createValidQuestionRequest.
private ReceiveMedicalCertificateQuestionType createValidQuestionRequest() {
ReceiveMedicalCertificateQuestionType request = new ReceiveMedicalCertificateQuestionType();
try {
JAXBContext jaxbContext = JAXBContext.newInstance(QuestionFromFkType.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
QuestionFromFkType question = unmarshaller.unmarshal(new StreamSource(new ClassPathResource("QuestionAnswerValidator/valid-question-from-fk.xml").getInputStream()), QuestionFromFkType.class).getValue();
request.setQuestion(question);
return request;
} catch (Exception e) {
throw new RuntimeException("Failed to load QuestionRequest template");
}
}
Aggregations