Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.codehaus.groovy.grails.test
- import org.codehaus.groovy.grails.test.event.GrailsTestEventPublisher
- /**
- * Describes the contract that a test type must support to be
- * runnable by `grails test-app`.
- */
- interface GrailsTestType {
- /**
- * A suitable display name for this test type.
- *
- * Can be called at any time.
- */
- String getName()
- /**
- * The relative path from the configured test source directory to the particular directory
- * that contains the tests for this test type.
- *
- * Do not use literal "/"'s in the path. Use {@link File#pathSeparator} to ensure platform compatibility.
- *
- * The build will compile the source in directory returned by this if it is not null and exists.
- *
- * @return the directory to compile relative to the build test directory, or {@code null} if there is nothing to compile.
- */
- String getSourceDirectory()
- /**
- * Perform any kind of initialisation, and check that this type should run.
- *
- * If {@code false} is returned, this type will <b>not</b> be run. This object
- * is responsible for outputting any kind of warning/error message as to why it
- * won't be run.
- *
- * Will be called after {@link getSourceDirectory()}.
- *
- * @param buildBinding the binding from the build environment
- * @param compiledClassesDirectory where the source was compiled to, or {@code null} if
- * {@link getSourceDirectory()} returned {@code null}.
- * @return whether or not this type should be run.
- */
- boolean prepare(Binding buildBinding, File compiledClassesDirectory)
- /**
- * Runs the tests, appropriately calls {@link GrailsTestEventPublisher eventPublisher} and
- * returns the {@link GrailsTestTypeResult test result}.
- */
- GrailsTestTypeResult run(GrailsTestEventPublisher eventPublisher)
- /**
- * Do any necessary tidy up.
- */
- void cleanup()
- }
Add Comment
Please, Sign In to add comment