Пример #1
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);
 }
Пример #2
0
 @TestStep(C50)
 public void insert50cents() {
   scripter.step("50c");
   coins += 50;
   req.covered(C50);
 }
Пример #3
0
 @TestStep(C20)
 public void insert20cents() {
   scripter.step("20c");
   coins += 20;
   req.covered(C20);
 }
Пример #4
0
 @TestStep(C10)
 public void insert10cents() {
   scripter.step("10c");
   coins += 10;
   req.covered(C10);
 }
Пример #5
0
 public VendingMachine() {
   req.add(C10);
   req.add(C20);
   req.add(C50);
   req.add(VEND);
 }