@BeforeTest public void start() { coins = 0; bottles = 10; machine.prepare(); this.test = testSuite.getCurrentTest(); int tests = testSuite.getAllTestCases().size() + 1; }
@TestStep(VEND) public void vend() { Item item = machine.random(coins, rand); scripter.step("VEND (" + bottles + ") - " + item.name); test.addCoverage("item", item.name); coins -= item.cost; bottles--; req.covered(VEND); }
@Guard(VEND) public boolean allowVend() { return machine.canVend(coins); }