Skip to content
Isaac Leinweber edited this page Dec 11, 2015 · 1 revision

Test Code

HackUnit scans your code base for class methods that contain test code. Your test code must follow these rules to be found:

  • All test code must be in public, non-static, class methods
  • The constructor of a class containing test code must require zero parameters (this restriction should be lifted in the future)
  • All test methods must be annotated with <<Test>>
  • All test methods must require one parameter of type HackPack\HackUnit\Assert

There are no restrictions on where your test code must live, but you must still tell HackUnit where to look (see Bootstrapping).

Clone this wiki locally