package data;

import static org.junit.Assert.assertSame;

import java.util.Arrays;
import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import org.junit.Test;

import com.darwinsys.todo.model.Priority;
import com.darwinsys.todo.model.Task;

/**
 * ATM this tests ONLY the default method in the List interface;
 * need to move to Arquillian to test the actual list methods.
 */
public class TodoListTest {

	@Test
	public void testOrderByPrio() {
		Task t0 = new Task();
		t0.setName("t0");
		t0.setPriority(Priority.Low);
		
		Task t1 = new Task();
		t1.setName("t1");
		t1.setPriority(Priority.Top);

		List<Task> l = Arrays.asList(new Task[] { t0, t1 });

		List<Task> sorted = TodoList.orderByPriority(l);

		assertSame(t0, sorted.get(1));
		assertSame(t1, sorted.get(0));
	}
}

@@ -272,74 +272,21 @@
 %0A * 
-ATM this tests ONLY the default method in the List interface;%0A * n
+Empty ATM.  N
 eed 
@@ -376,380 +376,16 @@
 t %7B%0A
-%0A%09@Test%0A%09public void testOrderByPrio() %7B%0A%09%09Task t0 = new Task();%0A%09%09t0.setName(%22t0%22);%0A%09%09t0.setPriority(Priority.Low);%0A%09%09%0A%09%09Task t1 = new Task();%0A%09%09t1.setName(%22t1%22);%0A%09%09t1.setPriority(Priority.Top);%0A%0A%09%09List%3CTask%3E l = Arrays.asList(new Task%5B%5D %7B t0, t1 %7D);%0A%0A%09%09List%3CTask%3E sorted = TodoList.orderByPriority(l);%0A%0A%09%09assertSame(t0, sorted.get(1));%0A%09%09assertSame(t1, sorted.get(0));%0A%09%7D
+%09// empty
 %0A%7D%0A

Remove test that has been obviated by progress