I have a list of counters , and I would like to check that the value of counters is > 0 : have you any suggestion on my code ?
ArrayList<Integer> list = new ArrayList<Integer>(); int count1=0; int count2=0; for (int i = 0; i <x; i++) { if (action1) { count1++; } if (action2) { count2++; } } list.add(count1); list.add(count2); I need to check that only count1 is != 0
assertTrue(list>0); ???
assertTrue(list.size() > 0)orassertTrue(!list.isEmpty())?