Esempio n. 1
0
 @BeforeTest
 public void start() {
   coins = 0;
   bottles = 10;
   machine.prepare();
   this.test = testSuite.getCurrentTest();
   int tests = testSuite.getAllTestCases().size() + 1;
 }
Esempio n. 2
0
 @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);
 }
Esempio n. 3
0
 @Guard(VEND)
 public boolean allowVend() {
   return machine.canVend(coins);
 }