@Test public void testGetValues() { System.out.println("getValues"); MinMaxSpinValueHandler instance = new MinMaxSpinValueHandler(new JSpinner(), new JSpinner()); instance.setMinAndMax(2, 15); ArrayList<Integer> expResult = new ArrayList<>(); for (int i = 2; i <= 15; i++) { expResult.add(i); } ArrayList<Integer> result = instance.getValues(); assertTrue(expResult.equals(result)); }
public ArrayList<Integer> getValues() { ArrayList<Integer> result = new ArrayList<>(); for (int i = minBefore; i <= maxBefore; i++) { result.add(i); } return result; }
MinMaxSpinValueHandler implements ChangeListener { public ArrayList<Integer> getValues() { ArrayList<Integer> result = new ArrayList<>(); for (int i = minBefore; i <= maxBefore; i++) { result.add(i); } return result; } }
MinMaxSpinValueHandler implements ChangeListener { public ArrayList<Integer> getValues() { ArrayList<Integer> result = new ArrayList<>(); for (int i = minBefore; i <= maxBefore; i++) { result.add(i); } return result; } MinMaxSpinValueHandler(JSpinner minSpinner, JSpinner maxSpinner); }
MinMaxSpinValueHandler implements ChangeListener { public ArrayList<Integer> getValues() { ArrayList<Integer> result = new ArrayList<>(); for (int i = minBefore; i <= maxBefore; i++) { result.add(i); } return result; } MinMaxSpinValueHandler(JSpinner minSpinner, JSpinner maxSpinner); ArrayList<Integer> getValues(); synchronized void setMinAndMax(Integer min, Integer max); @Override synchronized void stateChanged(ChangeEvent e); }
MinMaxSpinValueHandler implements ChangeListener { public ArrayList<Integer> getValues() { ArrayList<Integer> result = new ArrayList<>(); for (int i = minBefore; i <= maxBefore; i++) { result.add(i); } return result; } MinMaxSpinValueHandler(JSpinner minSpinner, JSpinner maxSpinner); ArrayList<Integer> getValues(); synchronized void setMinAndMax(Integer min, Integer max); @Override synchronized void stateChanged(ChangeEvent e);  }