|
|
@ -31,8 +31,7 @@ import static junit.framework.TestCase.assertFalse;
|
|
|
|
import static org.hamcrest.CoreMatchers.*;
|
|
|
|
import static org.hamcrest.CoreMatchers.*;
|
|
|
|
import static org.hamcrest.MatcherAssert.assertThat;
|
|
|
|
import static org.hamcrest.MatcherAssert.assertThat;
|
|
|
|
import static org.isoron.uhabits.core.models.HabitList.Order.*;
|
|
|
|
import static org.isoron.uhabits.core.models.HabitList.Order.*;
|
|
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
import static org.junit.Assert.assertNull;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("JavaDoc")
|
|
|
|
@SuppressWarnings("JavaDoc")
|
|
|
|
public class HabitListTest extends BaseUnitTest
|
|
|
|
public class HabitListTest extends BaseUnitTest
|
|
|
@ -223,6 +222,17 @@ public class HabitListTest extends BaseUnitTest
|
|
|
|
habitList.reorder(h1, h2);
|
|
|
|
habitList.reorder(h1, h2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
public void testOrder_inherit()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
habitList.setOrder(BY_COLOR_ASC);
|
|
|
|
|
|
|
|
HabitList filteredList = habitList.getFiltered(new HabitMatcherBuilder()
|
|
|
|
|
|
|
|
.setArchivedAllowed(false)
|
|
|
|
|
|
|
|
.setCompletedAllowed(false)
|
|
|
|
|
|
|
|
.build());
|
|
|
|
|
|
|
|
assertEquals(filteredList.getOrder(), BY_COLOR_ASC);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testWriteCSV() throws IOException
|
|
|
|
public void testWriteCSV() throws IOException
|
|
|
|
{
|
|
|
|
{
|
|
|
|