Repository navigation
Expand file tree
/
Copy pathtestZebre.java
More file actions
56 lines (50 loc) · 1.52 KB
/
Copy pathtestZebre.java
File metadata and controls
56 lines (50 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package tp1;
import static org.junit.Assert.*;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import org.junit.Test;
public class testZebre {
/*@Test
public void test() {
String fileName="\\junitzebre";
Network myNetwork = null;
try {
System.out.println("Chargement du fichier : "+new java.io.File("../").getCanonicalPath()+ "/" + fileName);
} catch (IOException e) {
System.out.println("Erreur lors du chargement du fichier ! ");
e.printStackTrace();
}
BufferedReader readFile=null;
try {
readFile = new BufferedReader(new FileReader("C:\\Users\\Fireez\\Desktop\\Master\\eclipse\\IntelligenceArtificielle"+fileName));
} catch (FileNotFoundException e) {
System.out.println("Erreur lors de la lecture du fichier ! ");
e.printStackTrace();
}
try {
myNetwork= new Network(readFile);
} catch (Exception e) {
System.out.println("Erreur lors du chargement du network ! ");
e.printStackTrace();
}
try {
readFile.close();
} catch (IOException e) {
System.out.println("Erreur lors de la fermeture du fichier ! ");
e.printStackTrace();
}
CSP x = new CSP(myNetwork);
Assignment A = new Assignment() ;
A.put("english", 2);
A.put("norvegian", 2);
A.put("japanese", 2);
A.put("spanish", 2);
A.put("ukranian", 2);
System.out.println(myNetwork.toString());
System.out.println(A.toString());
assertTrue(x.consistant("english",A));
}
*/
}