333435363738394041424344
} @Test public void Returns_Empty_Results_When_Given_Empty_List() { List<Thing> list = new ArrayList<Thing>(); Finder finder = new Finder(list); F result = finder.Find(FT.One); assertEquals(null, result.P1); assertEquals(null, result.P2); }
464748495051525354555657
@Test public void Returns_Empty_Results_When_Given_One_Person() { List<Thing> list = new ArrayList<Thing>(); list.add(sue); Finder finder = new Finder(list); F result = finder.Find(FT.One); assertEquals(null, result.P1); assertEquals(null, result.P2); }
596061626364656667686970
@Test public void Returns_Closest_Two_For_Two_People() { List<Thing> list = new ArrayList<Thing>(); list.add(sue); list.add(greg); Finder finder = new Finder(list); F result = finder.Find(FT.One); assertEquals(sue, result.P1); assertEquals(greg, result.P2); }
737475767778798081828384
public void Returns_Furthest_Two_For_Two_People() { List<Thing> list = new ArrayList<Thing>(); list.add(mike); list.add(greg); Finder finder = new Finder(list); F result = finder.Find(FT.Two); assertEquals(greg, result.P1); assertEquals(mike, result.P2); }
888990919293949596979899
List<Thing> list = new ArrayList<Thing>(); list.add(sue); list.add(sarah); list.add(mike); list.add(greg); Finder finder = new Finder(list); F result = finder.Find(FT.Two); assertEquals(sue, result.P1); assertEquals(sarah, result.P2); }
104105106107108109110111112113114115
list.add(sue); list.add(sarah); list.add(mike); list.add(greg); Finder finder = new Finder(list); F result = finder.Find(FT.One); assertEquals(sue, result.P1); assertEquals(greg, result.P2); }