@Test public void testGetDescriptionClassWithNoDescription() { assertTrue(tlsToolkitMain.getDescription(TlsToolkitMainTest.class).startsWith(TlsToolkitMain.UNABLE_TO_GET_DESCRIPTION)); }
protected String getDescription(Class<?> clazz) { try { Field declaredField = clazz.getDeclaredField(DESCRIPTION); return String.valueOf(declaredField.get(null)); } catch (Exception e) { return UNABLE_TO_GET_DESCRIPTION + e.getMessage() + ")"; } }
TlsToolkitMain { protected String getDescription(Class<?> clazz) { try { Field declaredField = clazz.getDeclaredField(DESCRIPTION); return String.valueOf(declaredField.get(null)); } catch (Exception e) { return UNABLE_TO_GET_DESCRIPTION + e.getMessage() + ")"; } } }
TlsToolkitMain { protected String getDescription(Class<?> clazz) { try { Field declaredField = clazz.getDeclaredField(DESCRIPTION); return String.valueOf(declaredField.get(null)); } catch (Exception e) { return UNABLE_TO_GET_DESCRIPTION + e.getMessage() + ")"; } } TlsToolkitMain(); }
TlsToolkitMain { protected String getDescription(Class<?> clazz) { try { Field declaredField = clazz.getDeclaredField(DESCRIPTION); return String.valueOf(declaredField.get(null)); } catch (Exception e) { return UNABLE_TO_GET_DESCRIPTION + e.getMessage() + ")"; } } TlsToolkitMain(); static void main(String[] args); void doMain(String[] args); }
TlsToolkitMain { protected String getDescription(Class<?> clazz) { try { Field declaredField = clazz.getDeclaredField(DESCRIPTION); return String.valueOf(declaredField.get(null)); } catch (Exception e) { return UNABLE_TO_GET_DESCRIPTION + e.getMessage() + ")"; } } TlsToolkitMain(); static void main(String[] args); void doMain(String[] args); static final String DESCRIPTION; static final String UNABLE_TO_GET_DESCRIPTION; }