Code example for Method

Methods: getAnnotation, getName

0
    } 
    return testMethods;
  } 
 
  private boolean isTestMethod(Method method) {
    return method.getAnnotation(org.junit.Test.class) != null || method.getName().startsWith("test");
  } 
 
  public String toJson() throws JSONException {
    return new JSONArray(converter.convert(tests)).toString();
  } 
 
  private static class IgnoredTestCase { 
    public static Map<String, Object> asMap(String className, String testName, Ignore ignore) {
      final Map<String, Object> map = new HashMap<String, Object>();
      map.put("className", className);
      map.put("testName", testName);
      map.put("reason", ignore.reason());
      map.put("issues", ignore.issues());
 
      final Set<String> drivers = new HashSet<String>();