public static List<Class<?>> collectCaseClasses(TestSuite suite) {
   return filterDuplicates(
       CollectionUtil.transform(
           collectCases(suite),
           new Function<Test, Class<?>>() {
             @Override
             public Class<?> get(Test input) {
               return input.getClass();
             }
           }));
 }
Beispiel #2
0
  public List<String> getIdsFromName(final String name) {
    notNull("name", name);
    Collection<Version> versions = versionManager.getVersionsByName(name);

    Function<Version, String> function =
        new Function<Version, String>() {
          public String get(final Version input) {
            return input.getId().toString();
          }
        };

    return CollectionUtil.transform(versions, function);
  }
 public static List<String> collectCaseNames(TestSuite suite) {
   return filterDuplicates(
       CollectionUtil.transform(
           collectCases(suite),
           new Function<Test, String>() {
             @Override
             public String get(Test input) {
               if (input instanceof TestCase) {
                 return ((TestCase) input).getName();
               }
               return "";
             }
           }));
 }