@Test public void getAllReturnsEmptyNotANull() { printTestName(); Headers actual = new Headers(); Headers allheaders = actual.getAll(); System.out.println(allheaders); assertThat(allheaders, CoreMatchers.notNullValue()); }
@Test public void pair3() { printTestName(); System.out.println("pair3: " + pair3); Header actual = headers.getByIndex(2); System.out.println("actual: " + actual); assertEquals(pair3, actual); }
@Test public void getByIndexReturnsEmptyNotANull() { printTestName(); Header actual = headers.getByIndex(5); System.out.println(actual); assertThat(actual, CoreMatchers.notNullValue()); }
@Test public void pair2_NotFound_DiffCaps_Key() { printTestName(); Header aDifferentPair = new Header("lUnch", "pasta"); // capital U in lUnch System.out.println("aDifferentPair: " + aDifferentPair); Header actual = headers.getByIndex(1); System.out.println("actual: " + actual); assertNotSame(aDifferentPair, actual); }
@Test public void pair1_NotFound_DiffCaps_Value() { printTestName(); Header aDifferentPair = new Header("breakfast", "blueberry Smoothie"); // capital S for Smoothie System.out.println("aDifferentPair: " + aDifferentPair); Header actual = headers.getByIndex(0); System.out.println("actual: " + actual); assertNotSame(aDifferentPair, actual); }
@Test public void pair3_NotFound_DiffCaps_KeyAndValue() { printTestName(); Header aDifferentPair = new Header("dinner", "Beef stew"); // lower d, S in dinner, stew; capital Beef System.out.println("aDifferentPair: " + aDifferentPair); Header actual = headers.getByIndex(2); System.out.println("actual: " + actual); assertNotSame(aDifferentPair, actual); }
@BeforeClass public static void setUpBeforeClass() throws Exception { headers.add(pair1); headers.add(pair2); headers.add(pair3); }