public static void generateJavaFiles ( String requirementsFolder , String platformName , String src_test_dir , String tests_package , String casemanager_package , String loggingPropFile ) throws Exception { File reqFolder = new File ( requirementsFolder ) ; if ( reqFolder . isDirectory ( ) ) { for ( File f : reqFolder . listFiles ( ) ) { if ( f . getName ( ) . endsWith ( ".story" ) ) { try { SystemReader . generateJavaFilesForOneStory ( f . getCanonicalPath ( ) , platformName , src_test_dir , tests_package , casemanager_package , loggingPropFile ) ; } catch ( IOException e ) { String message = "ERROR: " + e . getMessage ( ) ; logger . severe ( message ) ; throw new BeastException ( message , e ) ; } } } for ( File f : reqFolder . listFiles ( ) ) { if ( f . isDirectory ( ) ) { SystemReader . generateJavaFiles ( requirementsFolder + File . separator + f . getName ( ) , platformName , src_test_dir , tests_package + "." + f . getName ( ) , casemanager_package , loggingPropFile ) ; } } } else if ( reqFolder . getName ( ) . endsWith ( ".story" ) ) { SystemReader . generateJavaFilesForOneStory ( requirementsFolder , platformName , src_test_dir , tests_package , casemanager_package , loggingPropFile ) ; } else { String message = "No story file found in " + requirementsFolder ; logger . severe ( message ) ; throw new BeastException ( message ) ; } }
Main method of the class which handles the process of creating the tests