This library provides a suite of tools to make testing Mirth Connect channels much simpler. Get up and running quickly: #####Gradle (build.gradle)
dependencies{
compile "uk.nhs.ouh.mirth:mirth-connect-spock:1.0.0"
}
<dependencies>
<dependency>
<artifactId>mirth-connect-spock</artifactId>
<groupId>uk.nhs.ouh.mirth</groupId>
<version>1.0.0</version>
</dependency>
</dependencies>
- Create a Gradle project
- Add this project as a dependency in your
build.gradle
- Add your JavaScript functions from Mirth Connect into
/src/main/js/
- Start writing your specification tests using Spock in
/src/test/groovy/
- TODO complete this bit, including MVN/Gradle reqs
Yeah, that's possible too. Unlike Mirth Connect, the Mirth Results domain classes aren't in the public domain, but once you've obtained a copy for MirthCorp you can just include the library in your Gradle project and it'll just work.
- Create a
lib/
directory, and place the Mirth Results (or any other useful libraries not available through Maven) JAR file there - In the
dependencies
section of yourbuild.gradle
addcompile fileTree(dir: 'lib', include: '*.jar')
- Crack on! Use the standard Rhino method to access the Java class (e.g.
var myClassOfInterest = Packages.com.mirth.results.ClassOfInterest;
)
The available emulator packages are provided by the EmulatorJSResource
enum. To load an emulator package into the MirthRhinoSpec
specification, simply add
loadJSIntoContext(EmulatorJSResource.MIRTH_CONNECT_MESSAGING)
Pull requests, issues and abuse on Twitter are all welcome!
To publish this to Bintray you need to update the credentials in build.gradle
and then run the following:
$ gradle build
$ gradle bintrayUpload
Do not forget to PUBLISH it in Bintray to confirm it, otherwise it will be removed within a couple of minutes!
- Source code: https://github.com/OxBRCInformatics/mirth-connect-spock
- Issue tracker: https://github.com/OxBRCInformatics/mirth-connect-spock/issues
- Maven artifacts: https://bintray.com/spikeheap/maven/mirth-connect-spock/view
This project is released under the MIT License (MIT)
Copyright (c) 2014 Ryan Brooks
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.