For testing purposes, I would like to create an EnsLib.HL7.Message from either a %String or a file on disk and pass it into a function in a unit test (outside of an Ensemble context). EnsLib.HL7.Parser appears to do the necessary parsing, but it also sends the message via Ensemble service rather than returning it as a value. Is there a way to leverage the parsing outside of a Ensemble service? Alternatively, is there another way to create an EnsLib.HL7.Message?
Take a look at the EnsLib.HL7.Message class. It has the following method to import from %String:
It also provides similar methods for importing from streams, which could be a file character stream. You can view all of these methods using the class reference from the documentation. Hope that helps.