@Test public final void testPerformAction() { final List<Person> people = new ArrayList<Person>(); context.checking(new Expectations() { { oneOf(lookupStrategy).findPeople(QUERY_STRING, MAX_RESULTS); will(returnValue(people)); } }); sut = new PersonLookupUtilityStrategy(lookupStrategy); assertEquals(people, sut.getPeople(QUERY_STRING, MAX_RESULTS)); context.assertIsSatisfied(); }
public List<Person> getPeople(final String inQueryString, final int inMaxResults) { return lookupStrategy.findPeople(inQueryString, inMaxResults); }
PersonLookupUtilityStrategy { public List<Person> getPeople(final String inQueryString, final int inMaxResults) { return lookupStrategy.findPeople(inQueryString, inMaxResults); } }
PersonLookupUtilityStrategy { public List<Person> getPeople(final String inQueryString, final int inMaxResults) { return lookupStrategy.findPeople(inQueryString, inMaxResults); } PersonLookupUtilityStrategy(final PersonLookupStrategy inLookupStrategy); }
PersonLookupUtilityStrategy { public List<Person> getPeople(final String inQueryString, final int inMaxResults) { return lookupStrategy.findPeople(inQueryString, inMaxResults); } PersonLookupUtilityStrategy(final PersonLookupStrategy inLookupStrategy); List<Person> getPeople(final String inQueryString, final int inMaxResults); }
PersonLookupUtilityStrategy { public List<Person> getPeople(final String inQueryString, final int inMaxResults) { return lookupStrategy.findPeople(inQueryString, inMaxResults); } PersonLookupUtilityStrategy(final PersonLookupStrategy inLookupStrategy); List<Person> getPeople(final String inQueryString, final int inMaxResults);  }