mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
replacing getDescription with getQuestion all over the code
This commit is contained in:
@@ -67,7 +67,7 @@ public class HabitBullCSVImporter extends AbstractImporter
|
||||
String name = line[0];
|
||||
if (name.equals("HabitName")) continue;
|
||||
|
||||
String description = line[1];
|
||||
String question = line[1];
|
||||
String dateString[] = line[3].split("-");
|
||||
int year = Integer.parseInt(dateString[0]);
|
||||
int month = Integer.parseInt(dateString[1]);
|
||||
@@ -87,7 +87,7 @@ public class HabitBullCSVImporter extends AbstractImporter
|
||||
{
|
||||
h = modelFactory.buildHabit();
|
||||
h.setName(name);
|
||||
h.setDescription(description);
|
||||
h.setQuestion(question);
|
||||
h.setFrequency(Frequency.DAILY);
|
||||
habitList.add(h);
|
||||
map.put(name, h);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RewireDBImporter extends AbstractImporter
|
||||
{
|
||||
int id = c.getInt(0);
|
||||
String name = c.getString(1);
|
||||
String description = c.getString(2);
|
||||
String question = c.getString(2);
|
||||
int schedule = c.getInt(3);
|
||||
String activeDays = c.getString(4);
|
||||
int repeatingCount = c.getInt(5);
|
||||
@@ -101,7 +101,7 @@ public class RewireDBImporter extends AbstractImporter
|
||||
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setName(name);
|
||||
habit.setDescription(description);
|
||||
habit.setQuestion(question);
|
||||
|
||||
int periods[] = { 7, 31, 365 };
|
||||
int numerator, denominator;
|
||||
|
||||
@@ -123,11 +123,11 @@ public class TickmateDBImporter extends AbstractImporter
|
||||
{
|
||||
int id = c.getInt(0);
|
||||
String name = c.getString(1);
|
||||
String description = c.getString(2);
|
||||
String question = c.getString(2);
|
||||
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setName(name);
|
||||
habit.setDescription(description);
|
||||
habit.setQuestion(question);
|
||||
habit.setFrequency(Frequency.DAILY);
|
||||
habitList.add(habit);
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ public abstract class HabitList implements Iterable<Habit>
|
||||
String[] cols = {
|
||||
String.format("%03d", indexOf(habit) + 1),
|
||||
habit.getName(),
|
||||
habit.getDescription(),
|
||||
habit.getQuestion(),
|
||||
Integer.toString(freq.getNumerator()),
|
||||
Integer.toString(freq.getDenominator()),
|
||||
ColorConstants.CSV_PALETTE[habit.getColor()]
|
||||
|
||||
@@ -43,7 +43,7 @@ public class HabitFixtures
|
||||
{
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setName("Meditate");
|
||||
habit.setDescription("Did you meditate this morning?");
|
||||
habit.setQuestion("Did you meditate this morning?");
|
||||
habit.setColor(3);
|
||||
habit.setFrequency(Frequency.DAILY);
|
||||
saveIfSQLite(habit);
|
||||
@@ -73,7 +73,7 @@ public class HabitFixtures
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setType(Habit.NUMBER_HABIT);
|
||||
habit.setName("Run");
|
||||
habit.setDescription("How many miles did you run today?");
|
||||
habit.setQuestion("How many miles did you run today?");
|
||||
habit.setUnit("miles");
|
||||
habit.setTargetType(Habit.AT_LEAST);
|
||||
habit.setTargetValue(2.0);
|
||||
@@ -98,7 +98,7 @@ public class HabitFixtures
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setType(Habit.NUMBER_HABIT);
|
||||
habit.setName("Walk");
|
||||
habit.setDescription("How many steps did you walk today?");
|
||||
habit.setQuestion("How many steps did you walk today?");
|
||||
habit.setUnit("steps");
|
||||
habit.setTargetType(Habit.AT_LEAST);
|
||||
habit.setTargetValue(100);
|
||||
@@ -133,7 +133,7 @@ public class HabitFixtures
|
||||
{
|
||||
Habit habit = modelFactory.buildHabit();
|
||||
habit.setName("Wake up early");
|
||||
habit.setDescription("Did you wake up before 6am?");
|
||||
habit.setQuestion("Did you wake up before 6am?");
|
||||
habit.setFrequency(new Frequency(2, 3));
|
||||
saveIfSQLite(habit);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ImportTest extends BaseUnitTest
|
||||
|
||||
Habit habit = habitList.getByPosition(0);
|
||||
assertThat(habit.getName(), equalTo("Breed dragons"));
|
||||
assertThat(habit.getDescription(), equalTo("with love and fire"));
|
||||
assertThat(habit.getQuestion(), equalTo("with love and fire"));
|
||||
assertThat(habit.getFrequency(), equalTo(Frequency.DAILY));
|
||||
assertTrue(containsRepetition(habit, 2016, 3, 18));
|
||||
assertTrue(containsRepetition(habit, 2016, 3, 19));
|
||||
|
||||
@@ -218,13 +218,13 @@ public class HabitListTest extends BaseUnitTest
|
||||
|
||||
Habit h1 = fixtures.createEmptyHabit();
|
||||
h1.setName("Meditate");
|
||||
h1.setDescription("Did you meditate this morning?");
|
||||
h1.setQuestion("Did you meditate this morning?");
|
||||
h1.setFrequency(Frequency.DAILY);
|
||||
h1.setColor(3);
|
||||
|
||||
Habit h2 = fixtures.createEmptyHabit();
|
||||
h2.setName("Wake up early");
|
||||
h2.setDescription("Did you wake up before 6am?");
|
||||
h2.setQuestion("Did you wake up before 6am?");
|
||||
h2.setFrequency(new Frequency(2, 3));
|
||||
h2.setColor(5);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class HabitRecordTest extends BaseUnitTest
|
||||
{
|
||||
Habit original = modelFactory.buildHabit();
|
||||
original.setName("Hello world");
|
||||
original.setDescription("Did you greet the world today?");
|
||||
original.setQuestion("Did you greet the world today?");
|
||||
original.setColor(1);
|
||||
original.setArchived(true);
|
||||
original.setFrequency(Frequency.THREE_TIMES_PER_WEEK);
|
||||
@@ -58,7 +58,7 @@ public class HabitRecordTest extends BaseUnitTest
|
||||
{
|
||||
Habit original = modelFactory.buildHabit();
|
||||
original.setName("Hello world");
|
||||
original.setDescription("Did you greet the world today?");
|
||||
original.setQuestion("Did you greet the world today?");
|
||||
original.setColor(5);
|
||||
original.setArchived(false);
|
||||
original.setFrequency(Frequency.DAILY);
|
||||
|
||||
Reference in New Issue
Block a user