I'm using addForcedEncode to force a set on PV1-3-4 as the receiving system wants to see "^"'s where there are blank subfields for PV1-3.2, PV1-3.3, PV1-3.4.
I'm trying to test this in groovy but cant get the output to show the "^"'s.
to set the PV1-3-4 in any case:
parser.getParserConfiguration().addForcedEncode("PV1-3-4");
to test it in groovy:
def "Test of rulePV1_3 "() {
when:
_output.getPV1().parse(value)
_instance.rulePV1_3(_output)
then:
_output.getPV1().encode() == expected
where:
value || expected
"PV1|1|N||test|" || "PV1|1|N|^^^^|test"
}
When i run the test the ^^^^ never show, they're always stripped out. Is this something the encode is doing? I'm running a file to file test and it shows the "^"'s its only the groovy test/encode portion that does not show them.
question from:
https://stackoverflow.com/questions/65894178/hapi-v2-testing-parser-getparserconfiguration-addforcedencode-with-groovy-not 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…