Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. package org.codehaus.groovy.grails.test
  2.  
  3. import org.codehaus.groovy.grails.test.event.GrailsTestEventPublisher
  4.  
  5. /**
  6. * Describes the contract that a test type must support to be
  7. * runnable by `grails test-app`.
  8. */
  9. interface GrailsTestType {
  10.  
  11. /**
  12. * A suitable display name for this test type.
  13. *
  14. * Can be called at any time.
  15. */
  16. String getName()
  17.  
  18. /**
  19. * The relative path from the configured test source directory to the particular directory
  20. * that contains the tests for this test type.
  21. *
  22. * Do not use literal "/"'s in the path. Use {@link File#pathSeparator} to ensure platform compatibility.
  23. *
  24. * The build will compile the source in directory returned by this if it is not null and exists.
  25. *
  26. * @return the directory to compile relative to the build test directory, or {@code null} if there is nothing to compile.
  27. */
  28. String getSourceDirectory()
  29.  
  30. /**
  31. * Perform any kind of initialisation, and check that this type should run.
  32. *
  33. * If {@code false} is returned, this type will <b>not</b> be run. This object
  34. * is responsible for outputting any kind of warning/error message as to why it
  35. * won't be run.
  36. *
  37. * Will be called after {@link getSourceDirectory()}.
  38. *
  39. * @param buildBinding the binding from the build environment
  40. * @param compiledClassesDirectory where the source was compiled to, or {@code null} if
  41. * {@link getSourceDirectory()} returned {@code null}.
  42. * @return whether or not this type should be run.
  43. */
  44. boolean prepare(Binding buildBinding, File compiledClassesDirectory)
  45.  
  46. /**
  47. * Runs the tests, appropriately calls {@link GrailsTestEventPublisher eventPublisher} and
  48. * returns the {@link GrailsTestTypeResult test result}.
  49. */
  50. GrailsTestTypeResult run(GrailsTestEventPublisher eventPublisher)
  51.  
  52. /**
  53. * Do any necessary tidy up.
  54. */
  55. void cleanup()
  56. }
Add Comment
Please, Sign In to add comment