@Test public void testGetFormat() { assertEquals("one", manager.getFormat("one").getFormatShortName()); }
public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); }
WebHookPayloadManager { public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); } }
WebHookPayloadManager { public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); } WebHookPayloadManager(SBuildServer server); }
WebHookPayloadManager { public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); } WebHookPayloadManager(SBuildServer server); void registerPayloadFormat(WebHookPayload payloadFormat); WebHookPayload getFormat(String formatShortname); Boolean isRegisteredFormat(String format); List<WebHookPayload> getRegisteredFormats(); List<WebHookPayload> getTemplatedFormats(); Collection<WebHookPayload> getRegisteredFormatsAsCollection(); SBuildServer getServer(); }
WebHookPayloadManager { public WebHookPayload getFormat(String formatShortname){ if (formats.containsKey(formatShortname.toLowerCase())){ return formats.get(formatShortname.toLowerCase()); } throw new UnsupportedWebHookFormatException(formatShortname); } WebHookPayloadManager(SBuildServer server); void registerPayloadFormat(WebHookPayload payloadFormat); WebHookPayload getFormat(String formatShortname); Boolean isRegisteredFormat(String format); List<WebHookPayload> getRegisteredFormats(); List<WebHookPayload> getTemplatedFormats(); Collection<WebHookPayload> getRegisteredFormatsAsCollection(); SBuildServer getServer();  }