Code example for AtomicInteger

Methods: get

0
    CheckBox checkbox2 = new CheckBox(activity);
    checkbox2.setId(android.R.id.button2);
    root.addView(checkbox2);
 
    ViewFinder finder = new ViewFinder(root);
    final AtomicInteger run = new AtomicInteger(0);
    finder.onCheck(new Runnable() {
 
      public void run() { 
        run.incrementAndGet();
      } 
    }, android.R.id.button1, android.R.id.button2);
    checkbox1.performClick();
    assertEquals(1, run.get());
    checkbox2.performClick();
    assertEquals(2, run.get());
  } 
 
  /** 
   * Verify on check helpers 
   */