File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/test/java/com/mindee/parsing/common Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .mindee .parsing .common ;
2+
3+ import com .fasterxml .jackson .databind .JavaType ;
4+ import com .fasterxml .jackson .databind .ObjectMapper ;
5+ import com .mindee .product .invoicesplitter .InvoiceSplitterV1 ;
6+ import java .io .File ;
7+ import java .io .IOException ;
8+
9+ public class WorkflowResponseTest {
10+ private WorkflowResponse <InvoiceSplitterV1 > loadWorkflowResponse (String filePath ) throws
11+ IOException {
12+ ObjectMapper objectMapper = new ObjectMapper ();
13+ objectMapper .findAndRegisterModules ();
14+
15+ JavaType type = objectMapper .getTypeFactory ().constructParametricType (
16+ WorkflowResponse .class ,
17+ InvoiceSplitterV1 .class
18+ );
19+ return objectMapper .readValue (new File (filePath ), type );
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments