Update arborescence 2

This commit is contained in:
Louis Calas
2019-10-10 18:01:08 +02:00
parent 29dba04efb
commit a0b8e315db
167 changed files with 3 additions and 5 deletions

68
tests/csv/TestCSV.java Normal file
View File

@@ -0,0 +1,68 @@
package csv;
import static org.junit.jupiter.api.Assertions.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class TestCSV {
Map<String,String> map = new HashMap<String,String>();
String length = "8";
String path = "../export/result.csv";
GenerateCSV csv = new GenerateCSV(map,length,path);
@BeforeEach
void setUp() {
map = new HashMap<String,String>();
length = "8";
path = "../export/result.csv";
}
@Test
void testNotNull() {
map.put("21705239", "17");
csv = new GenerateCSV(map,length,path);
assertFalse(csv == null);
}
@Test
void testValid() {
map.put("21435712", "9");
map.put("21705239", "17");
csv = new GenerateCSV(map,length,path);
for (String etud : csv.etudiants.keySet()) {
assertTrue(csv.isValid(etud));
}
}
@Test
void testNotValid() {
map.put("21435", "9");
map.put("1705239", "17");
csv = new GenerateCSV(map,length,path);
for (String etud : csv.etudiants.keySet()) {
assertFalse(csv.isValid(etud));
}
}
@Test
void testGeneration() {
}
}