Exemplo n.º 1
0
 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();
             }
           }));
 }
Exemplo n.º 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);
  }
Exemplo n.º 3
0
 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 "";
             }
           }));
 }