Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Update HL7ExpressionEvaluatorTest.groovy
Browse files Browse the repository at this point in the history
Added a little more coverage
  • Loading branch information
luis-pabon-tf committed Dec 27, 2024
1 parent a773d70 commit b81125c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@ PID|1||11102779^^^CR^MR||SMITH^BB SARAH^^^^^L"""
thrown(HL7ParserException)
}

def "getFieldValue returns null for fields that don't exist"() {
given:
def fieldName = "ZZZ-1"
def inputMessage = Mock(HL7Message)

when:
def result = evaluator.getFieldValue(hl7Message, inputMessage, fieldName)

then:
result == null
}

def "getFieldValue throws exception for empty field name"() {
given:
def fieldName = ""
Expand Down

0 comments on commit b81125c

Please sign in to comment.