Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codinguser committed Aug 19, 2016
1 parent fcea711 commit 19f02a4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package org.gnucash.android.test.unit.db;

import android.content.res.Resources;

import org.gnucash.android.BuildConfig;
import org.gnucash.android.R;
import org.gnucash.android.app.GnuCashApplication;
import org.gnucash.android.db.adapter.ScheduledActionDbAdapter;
import org.gnucash.android.model.BaseModel;
import org.gnucash.android.model.PeriodType;
Expand Down Expand Up @@ -64,8 +68,10 @@ public void testGenerateRepeatString(){
periodType.setMultiplier(2);
scheduledAction.setRecurrence(new Recurrence(periodType));
scheduledAction.setTotalPlannedExecutionCount(4);
Resources res = GnuCashApplication.getAppContext().getResources();
String repeatString = res.getQuantityString(R.plurals.label_every_x_months, 2, 2) + ", " +
res.getString(R.string.repeat_x_times, 4);

String repeatString = "Every 2 months, for 4 times";
assertThat(scheduledAction.getRepeatString().trim()).isEqualTo(repeatString);

}
Expand Down

0 comments on commit 19f02a4

Please sign in to comment.