@Test public void ShouldCallSetMmol_WhenUserPreferredUnitIsNotMgDl() { user.setPreferred_unit(Constants.Units.MMOL_L); presenter.checkGlucoseUnit(); verify(activity).setMmol(); }
public void checkGlucoseUnit() { if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) { activity.setMmol(); } }
A1CCalculatorPresenter { public void checkGlucoseUnit() { if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) { activity.setMmol(); } } }
A1CCalculatorPresenter { public void checkGlucoseUnit() { if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) { activity.setMmol(); } } A1CCalculatorPresenter(@NonNull final A1cCalculatorActivity activity,
                                  @NonNull final DatabaseHandler dbHandler); }
A1CCalculatorPresenter { public void checkGlucoseUnit() { if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) { activity.setMmol(); } } A1CCalculatorPresenter(@NonNull final A1cCalculatorActivity activity,
                                  @NonNull final DatabaseHandler dbHandler); double calculateA1C(String glucose); void checkGlucoseUnit(); void saveA1C(double a1c); String getA1cUnit(); }
A1CCalculatorPresenter { public void checkGlucoseUnit() { if (!Constants.Units.MG_DL.equals(dbHandler.getUser(1).getPreferred_unit())) { activity.setMmol(); } } A1CCalculatorPresenter(@NonNull final A1cCalculatorActivity activity,
                                  @NonNull final DatabaseHandler dbHandler); double calculateA1C(String glucose); void checkGlucoseUnit(); void saveA1C(double a1c); String getA1cUnit();  }