|
35 | 35 | import com.textkernel.tx.models.api.parsing.ParseOptions; |
36 | 36 | import com.textkernel.tx.models.api.parsing.ParseRequest; |
37 | 37 | import com.textkernel.tx.models.api.parsing.ParseResumeResponse; |
| 38 | +import com.textkernel.tx.models.api.parsing.SkillsSettings; |
| 39 | +import com.textkernel.tx.TestData; |
| 40 | +import com.textkernel.tx.models.job.ParsedJob; |
| 41 | +import com.textkernel.tx.models.resume.ParsedResume; |
38 | 42 |
|
39 | 43 | public class MatchV2Tests extends TestBase { |
40 | 44 |
|
41 | 45 | private static final String _documentId = "1"; |
42 | 46 |
|
43 | 47 | @BeforeAll |
44 | 48 | static void setup() throws TxException { |
45 | | - // add a document to each index |
46 | | - ClientDESv2.searchMatchV2().addJob(_documentId, TestParsedJobTech, null, null); |
47 | | - ClientDESv2.searchMatchV2().addCandidate(_documentId, TestParsedResume, null, false, null); |
| 49 | + ParseOptions v2Options = new ParseOptions(); |
| 50 | + v2Options.SkillsSettings = new SkillsSettings(); |
| 51 | + v2Options.SkillsSettings.Normalize = true; |
| 52 | + v2Options.SkillsSettings.TaxonomyVersion = "V2"; |
| 53 | + |
| 54 | + ParsedJob jobV2 = ClientDESv2.parser().parseJob(new ParseRequest(TestData.JobOrderTech, v2Options)).Value.JobData; |
| 55 | + ParsedResume resumeV2 = ClientDESv2.parser().parseResume(new ParseRequest(TestData.Resume, v2Options)).Value.ResumeData; |
| 56 | + |
| 57 | + ClientDESv2.searchMatchV2().addJob(_documentId, jobV2, null, null); |
| 58 | + ClientDESv2.searchMatchV2().addCandidate(_documentId, resumeV2, null, false, null); |
48 | 59 | delayForIndexSync(5); |
49 | 60 | } |
50 | 61 |
|
@@ -94,6 +105,9 @@ public void testParseAndUpload() throws TxException, IOException { |
94 | 105 |
|
95 | 106 | ParseOptions options = new ParseOptions(); |
96 | 107 | options.IndexingOptions = new IndexingOptionsGeneric(MatchV2Environment.PROD, docId, null, null); |
| 108 | + options.SkillsSettings = new SkillsSettings(); |
| 109 | + options.SkillsSettings.Normalize = true; |
| 110 | + options.SkillsSettings.TaxonomyVersion = "V2"; |
97 | 111 |
|
98 | 112 | ParseResumeResponse parseResponse = ClientDESv2.parser().parseResume(new ParseRequest(document, options)); |
99 | 113 | assertTrue(parseResponse.Value.IndexingResponse.isSuccess()); |
|
0 commit comments