Refonte du repo

This commit is contained in:
JunkJumper
2020-05-20 17:01:49 +02:00
parent 4962efbd17
commit 45f4d2dffe
165 changed files with 83943 additions and 84353 deletions

View File

@ -0,0 +1,16 @@
package premierTest;
public class MaClasse {
public static int calculer(int a, int b) {
int res = a + b;
if (a == 0) {
res = b * 2;
}
if (b == 0) {
res = a * a;
}
return res;
}
}

View File

@ -0,0 +1,28 @@
package premierTest;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterEach;
public class MaClasseTest {
@BeforeEach
public void avantTest() {
System.out.println("----------Debut Test-------------");
}
@AfterEach
public void apresTest() {
System.out.println("-----------Fin Test--------------");
}
@Test
public void testCalculer() throws Exception {
assertEquals(2, MaClasse.calculer(1,1));
System.out.println(MaClasse.calculer(1,1));
}
}