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