Skip to content

Commit

Permalink
Amélioration de la class de test Simulateur (Analyse des args)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapk committed Oct 5, 2015
1 parent a26d8f1 commit 538110f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/SimulateurTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,32 @@ public void testMain() {
}


@Test
public void testAnalyseArgumentsEmpty() throws ArgumentsException, Exception {
System.out.println("Test AnalyseArgumentsEmpty");
String[] args = {};
new Simulateur(args);
}
@Test(expected = ArgumentsException.class)
public void testAnalyseArgumentsAmplInvalide() throws ArgumentsException, Exception {
System.out.println("Test AnalyseArgumentsAmplInvalide");
String[] args = ("-ampl 3 1").split(" ");
new Simulateur(args);
}

@Test(expected = ArgumentsException.class)
public void testAnalyseArgumentsFormInvalide() throws ArgumentsException, Exception {
System.out.println("Test AnalyseArgumentsFormInvalide");
String[] args = ("-form NRTE").split(" ");
new Simulateur(args);
}


@Test(expected = ArgumentsException.class)
public void testAnalyseArgumentsForm2Invalide() throws ArgumentsException, Exception {
System.out.println("Test AnalyseArgumentsForm2Invalide");
String[] args = ("-form ").split(" ");
new Simulateur(args);
}
//TODO Check all other params
}

0 comments on commit 538110f

Please sign in to comment.