Branch yann #6

Merged
YanNThO merged 47 commits from Branch_Yann into main 2021-02-01 18:36:46 +01:00
3 changed files with 33 additions and 29 deletions
Showing only changes of commit 4c5c9cf2b3 - Show all commits

View file

@ -6,9 +6,8 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />

View file

@ -8,19 +8,22 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class DataCsv {
protected String destination;
/**
* Le constructeur de DataCsv
*/
public DataCsv(){
this.destination = "src/test/resources/CsvFile";
}
/**
* La methode de recuperation dun fichier csv
* @param fileZip : nom suivit du chemin du fichier zip
*/
public void getCsv(String fileZip) throws IOException{
//"src/main/resources/loto_201911.zip"
File desDir = new File("src/main/resources/");
File desDir = new File(destination);
byte[] buffer = new byte[1024];
ZipInputStream zis = new ZipInputStream(new FileInputStream(fileZip));
ZipEntry zipEntry = zis.getNextEntry();
@ -50,7 +53,9 @@ public class DataCsv {
}
/**
* Methode d'extraction de fichier zip
* Methode verifiant si l extraction a bien ete faite
* @param destinationDir : chemin de destination
* @param zipEntry : zip cible
*/
public File newFile(File destinationDir, ZipEntry zipEntry) throws IOException{
File destFile = new File(destinationDir, zipEntry.getName());

View file

@ -15,7 +15,7 @@ public class ImportData {
*/
ImportData(){
this.url = "https://www.fdj.fr/jeux-de-tirage/loto/statistiques";
this.repDes = "src/test/resources/";
this.repDes = "src/test/resources/Download/";
}
/**