@Test public void no_entries_null_is_returned() { assertEquals(null, providerToTest.getIdForName("abc")); }
public String getIdForName(String name) { String id = null; for (NamePatternToIdEntry entry: entries) { if (entry.isMatching(name)) { id= entry.getId(); break; } } LOG.debug("'{}' returns id:{} for name:{}",getProviderId(),id,name); return id; }
NamePatternIdprovider { public String getIdForName(String name) { String id = null; for (NamePatternToIdEntry entry: entries) { if (entry.isMatching(name)) { id= entry.getId(); break; } } LOG.debug("'{}' returns id:{} for name:{}",getProviderId(),id,name); return id; } }
NamePatternIdprovider { public String getIdForName(String name) { String id = null; for (NamePatternToIdEntry entry: entries) { if (entry.isMatching(name)) { id= entry.getId(); break; } } LOG.debug("'{}' returns id:{} for name:{}",getProviderId(),id,name); return id; } NamePatternIdprovider(String providerId); }
NamePatternIdprovider { public String getIdForName(String name) { String id = null; for (NamePatternToIdEntry entry: entries) { if (entry.isMatching(name)) { id= entry.getId(); break; } } LOG.debug("'{}' returns id:{} for name:{}",getProviderId(),id,name); return id; } NamePatternIdprovider(String providerId); void add(NamePatternToIdEntry entry); String getIdForName(String name); String getProviderId(); @Override String toString(); }
NamePatternIdprovider { public String getIdForName(String name) { String id = null; for (NamePatternToIdEntry entry: entries) { if (entry.isMatching(name)) { id= entry.getId(); break; } } LOG.debug("'{}' returns id:{} for name:{}",getProviderId(),id,name); return id; } NamePatternIdprovider(String providerId); void add(NamePatternToIdEntry entry); String getIdForName(String name); String getProviderId(); @Override String toString();  }