コード例 #1
0
 /**
  * Determine the Path of the test data files
  *
  * @param dataLoader the {@link DataLoader} annotation
  * @return an array of resolved file names
  */
 private static String[] determineFilePaths(DataLoader dataLoader) {
   String[] filePaths = dataLoader.filePaths();
   String[] result = new String[filePaths.length];
   result = handleSystemProperty();
   if (result == null) {
     // filePaths cannot be null as the default is an empty array
     if (filePaths.length == 0) {
       LOG.info(
           "Neither System Property 'testDataFiles' nor the attribute 'filePaths' is specified.");
     } else {
       result = new String[filePaths.length];
       for (int i = 0; i < filePaths.length; i++) {
         if (isVariablePath(filePaths[i])) {
           result[i] = getTestDataFileExpression(filePaths[i]);
         } else {
           result[i] = filePaths[i];
         }
       }
     }
   }
   return result;
 }