@Test public void testDecreaseQuantity() { TimeAmount timeAmount = new TimeAmount(10, DateIntervalType.DAY); TimeAmountEditor timeAmountEditor = new TimeAmountEditor(timeAmountView); timeAmountEditor.init(timeAmount, changeCommand); timeAmountEditor.decreaseQuantity(); verify(timeAmountView).setQuantity(9); verify(changeCommand).execute(); assertEquals(timeAmount.getQuantity(), 9); }
public void decreaseQuantity() { long q = getQuantity()-1; changeQuantity(q); view.setQuantity(q); }
TimeAmountEditor implements IsWidget { public void decreaseQuantity() { long q = getQuantity()-1; changeQuantity(q); view.setQuantity(q); } }
TimeAmountEditor implements IsWidget { public void decreaseQuantity() { long q = getQuantity()-1; changeQuantity(q); view.setQuantity(q); } @Inject  TimeAmountEditor(View view); }
TimeAmountEditor implements IsWidget { public void decreaseQuantity() { long q = getQuantity()-1; changeQuantity(q); view.setQuantity(q); } @Inject  TimeAmountEditor(View view); @Override Widget asWidget(); TimeAmount getTimeAmount(); void init(final TimeAmount ta, Command onChangeCommand); long getQuantity(); void decreaseQuantity(); void increaseQuantity(); void changeQuantity(String value); void changeIntervalType(); }
TimeAmountEditor implements IsWidget { public void decreaseQuantity() { long q = getQuantity()-1; changeQuantity(q); view.setQuantity(q); } @Inject  TimeAmountEditor(View view); @Override Widget asWidget(); TimeAmount getTimeAmount(); void init(final TimeAmount ta, Command onChangeCommand); long getQuantity(); void decreaseQuantity(); void increaseQuantity(); void changeQuantity(String value); void changeIntervalType(); static List<DateIntervalType> INTERVAL_TYPES; }