tests added

This commit is contained in:
Sergey Solovyev
2013-06-25 12:11:04 +04:00
parent 21e8581f1f
commit 46e2a1c736
3 changed files with 72 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ public final class CalculatorWizardActivity extends SherlockFragmentActivity {
}
}
private void finishFlow() {
void finishFlow() {
if (flow != null && step != null) {
Wizard.saveWizardFinished(flow, step);
}
@@ -237,6 +237,18 @@ public final class CalculatorWizardActivity extends SherlockFragmentActivity {
return flow;
}
View getPrevButton() {
return prevButton;
}
View getNextButton() {
return nextButton;
}
View getFinishButton() {
return finishButton;
}
/*
**********************************************************************
*

View File

@@ -39,8 +39,8 @@ public final class Wizard {
}
}
public static boolean isWizardFinished(@Nonnull String name, @Nonnull Context context) {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
public static boolean isWizardFinished(@Nonnull String name) {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CalculatorApplication.getInstance());
return preferences.getBoolean(makeFlowFinishedPreferenceKey(name), false);
}