@Test public final void testLookup() throws NamingException { context.checking(new Expectations() { { oneOf(mapper).findPeopleByPrefix("searchString"); } }); sut.findPeople("searchString", 0); }
public List<Person> findPeople(final String searchString, final int resultsLimit) { String prefix = searchString; log.debug("DomainPersonLookup looking up " + searchString); List<Person> people = mapper.findPeopleByPrefix(prefix); return people; }
DomainPersonLookup implements PersonLookupStrategy { public List<Person> findPeople(final String searchString, final int resultsLimit) { String prefix = searchString; log.debug("DomainPersonLookup looking up " + searchString); List<Person> people = mapper.findPeopleByPrefix(prefix); return people; } }
DomainPersonLookup implements PersonLookupStrategy { public List<Person> findPeople(final String searchString, final int resultsLimit) { String prefix = searchString; log.debug("DomainPersonLookup looking up " + searchString); List<Person> people = mapper.findPeopleByPrefix(prefix); return people; } DomainPersonLookup(final PersonMapper inMapper); }
DomainPersonLookup implements PersonLookupStrategy { public List<Person> findPeople(final String searchString, final int resultsLimit) { String prefix = searchString; log.debug("DomainPersonLookup looking up " + searchString); List<Person> people = mapper.findPeopleByPrefix(prefix); return people; } DomainPersonLookup(final PersonMapper inMapper); List<Person> findPeople(final String searchString, final int resultsLimit); }
DomainPersonLookup implements PersonLookupStrategy { public List<Person> findPeople(final String searchString, final int resultsLimit) { String prefix = searchString; log.debug("DomainPersonLookup looking up " + searchString); List<Person> people = mapper.findPeopleByPrefix(prefix); return people; } DomainPersonLookup(final PersonMapper inMapper); List<Person> findPeople(final String searchString, final int resultsLimit);  }