File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/main/java/edu/rit/se/testsmells Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11package edu .rit .se .testsmells ;
22
33import java .io .BufferedReader ;
4+ import java .io .File ;
45import java .io .FileReader ;
56import java .io .IOException ;
67import java .util .ArrayList ;
@@ -11,10 +12,23 @@ public class Main {
1112 static List <TestFile > testFiles ;
1213
1314 public static void main (String [] args ) throws IOException {
15+ if (args == null ) {
16+ System .out .println ("Please provide the file containing the paths to the collection of test files" );
17+ return ;
18+ }
19+ if (!args [0 ].isEmpty ()){
20+ File inputFile = new File (args [0 ]);
21+ if (!inputFile .exists () || inputFile .isDirectory ()) {
22+ System .out .println ("Please provide a valid file containing the paths to the collection of test files" );
23+ return ;
24+ }
25+ }
26+
27+
1428 System .out .println ("Started!" );
1529
1630 MappingDetector mappingDetector ;
17- BufferedReader in = new BufferedReader (new FileReader ("F: \\ Projects \\ TestFileMapping \\ detected_testFile.csv" ));
31+ BufferedReader in = new BufferedReader (new FileReader (args [ 0 ] ));
1832 String str ;
1933
2034 testFiles = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments