In my task action I would like to implement a mock for the project antbuilder. I’m not too concerned what happens during that ant task call, but I would like to validate through unit testing that antBuilderInput is being populated correctly.
@TaskAction
void runWlDeployCommand() {
antBuilderInput = [:]
antBuilderInput += getConnectionArgs()
antBuilderInput += getUserCredentialArgs()
antBuilderInput += getCommonArgs()
ant.taskdef( name: 'wldeploy',
classname: 'weblogic.ant.taskdefs.management.WLDeploy',
classpath: project.configurations.weblogic.asPath )
ant.wldeploy( antBuilderInput )
}
Any help would be gratefully received.