@Test public void shouldNeqToEverythingIfIsNull() { Place place = new Place(); place.setWasFoundAt("aaa"); boolean res = Predicates.wasFoundAt(null).appliesTo(place); Assert.assertFalse(res); place.setWasFoundAt(null); res = Predicates.wasFoundAt(null).appliesTo(place); Assert.assertFalse(res); }
@Test public void shouldNeqPageItWasFetchedFromIfItIsDifferent() { Place place = new Place(); place.setWasFoundAt("aaa"); boolean res = Predicates.wasFoundAt("aab").appliesTo(place); Assert.assertFalse(res); }
@Test public void shouldEqPageItWasFetchedFrom() { Place place = new Place(); place.setWasFoundAt("aaa"); boolean res = Predicates.wasFoundAt("aaa").appliesTo(place); Assert.assertTrue(res); }