@@ -159,29 +159,15 @@ void testInferFromArrayNodeData() throws Exception {
159159 @ Test
160160 @ DisplayName ("Test infer from List containing File objects" )
161161 void testInferFromListWithFiles () throws Exception {
162- String testFileContent = TestHelper .getResourceFileContent ("/testsuite-data/files/csv/1mb.csv" );
163- String testFile2Content = TestHelper .getResourceFileContent ("/testsuite-data/files/csv/10mb.csv" );
164- File tempDirPath = Files .createTempDirectory ("datapackage-" ).toFile ();
165-
166- // Write content to temporary files
167- File testFile = new File (tempDirPath , "test1.csv" );
168- Files .write (testFile .toPath (), testFileContent .getBytes (StandardCharsets .UTF_8 ));
169-
170- File testFile2 = new File (tempDirPath , "test2.csv" );
171- Files .write (testFile2 .toPath (), testFile2Content .getBytes (StandardCharsets .UTF_8 ));
172-
162+ File testFile = TestHelper .getResourceFile ("/fixtures/data/AW_229_000001_000002.csv" );
163+ File testFile2 = TestHelper .getResourceFile ("/fixtures/data/AW_229_000001_000002_1Row.csv" );
173164 List <File > fileList = Arrays .asList (testFile , testFile2 );
174165
175166 Schema schema = Schema .infer (fileList , StandardCharsets .UTF_8 );
176167
177168 Assertions .assertNotNull (schema );
178169 Assertions .assertTrue (schema .getFields ().size () > 0 );
179170 Assertions .assertTrue (schema .isValid ());
180-
181- // Clean up
182- testFile .deleteOnExit ();
183- testFile2 .deleteOnExit ();
184- tempDirPath .deleteOnExit ();
185171 }
186172
187173 @ Test
0 commit comments