mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove inferred tables from SQLite database
This commit is contained in:
@@ -27,12 +27,12 @@ import java.util.*;
|
||||
|
||||
public class MemoryScoreList extends ScoreList
|
||||
{
|
||||
LinkedList<Score> list;
|
||||
ArrayList<Score> list;
|
||||
|
||||
public MemoryScoreList(Habit habit)
|
||||
{
|
||||
super(habit);
|
||||
list = new LinkedList<>();
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,7 +53,7 @@ public class MemoryScoreList extends ScoreList
|
||||
|
||||
for (Score s : list)
|
||||
if (s.getTimestamp() >= fromTimestamp &&
|
||||
s.getTimestamp() <= toTimestamp) filtered.add(s);
|
||||
s.getTimestamp() <= toTimestamp) filtered.add(s);
|
||||
|
||||
return filtered;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class MemoryScoreList extends ScoreList
|
||||
protected Score getNewestComputed()
|
||||
{
|
||||
if (list.isEmpty()) return null;
|
||||
return list.getFirst();
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -102,6 +102,6 @@ public class MemoryScoreList extends ScoreList
|
||||
protected Score getOldestComputed()
|
||||
{
|
||||
if (list.isEmpty()) return null;
|
||||
return list.getLast();
|
||||
return list.get(list.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ import java.util.*;
|
||||
|
||||
public class MemoryStreakList extends StreakList
|
||||
{
|
||||
LinkedList<Streak> list;
|
||||
ArrayList<Streak> list;
|
||||
|
||||
public MemoryStreakList(Habit habit)
|
||||
{
|
||||
super(habit);
|
||||
list = new LinkedList<>();
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,6 +36,7 @@ import static org.mockito.Mockito.*;
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class BaseUnitTest
|
||||
{
|
||||
|
||||
protected HabitList habitList;
|
||||
|
||||
protected HabitFixtures fixtures;
|
||||
@@ -46,12 +47,13 @@ public class BaseUnitTest
|
||||
|
||||
protected CommandRunner commandRunner;
|
||||
|
||||
// 8:00am, January 25th, 2015 (UTC)
|
||||
protected static final long FIXED_LOCAL_TIME = 1422172800000L;
|
||||
|
||||
@Before
|
||||
public void setUp()
|
||||
{
|
||||
// 8:00am, January 25th, 2015 (UTC)
|
||||
long fixed_local_time = 1422172800000L;
|
||||
DateUtils.setFixedLocalTime(fixed_local_time);
|
||||
DateUtils.setFixedLocalTime(FIXED_LOCAL_TIME);
|
||||
|
||||
modelFactory = new MemoryModelFactory();
|
||||
habitList = spy(modelFactory.buildHabitList());
|
||||
|
||||
Reference in New Issue
Block a user