📄 checkargumentstest.java
字号:
/* * checkArgumentsTest.java * JUnit based test * * Created on 8 novembre 2004, 11:22 */package test;import reservation.system.functions.Functions;import java.util.Vector;import java.util.ListIterator;import java.util.LinkedList;import java.util.Collection;import java.util.HashSet;import java.util.Set;import junit.framework.*;/** * * @author mathieu */public class checkArgumentsTest extends TestCase { public checkArgumentsTest (java.lang.String testName) { super (testName); } public static Test suite () { TestSuite suite = new TestSuite (checkArgumentsTest.class); return suite; } /** * Test of validityArgument method, of class FlightSystem.checkArguments. */ public void testArgumentisValid () { System.out.println ("testArgumentIsValid"); String errorString = "Error"; try { Functions.ArgumentIsValid (new String[]{"Adam","Caroline"},0,0); fail ("Illegal number of argument"); } catch (Exception e) {System.out.println (errorString + " OK :" + e.getMessage ());} try { Functions.ArgumentIsValid (new String[]{null},0,0); fail ("Illegal number of argument and argument null"); } catch (Exception e) {System.out.println (errorString + " OK :" + e.getMessage ());} try { Functions.ArgumentIsValid (new String[]{"Adam","Caroline"},2,0); fail ("The max must be superior to the min."); } catch (Exception e) {System.out.println (errorString + " OK :" + e.getMessage ());} }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -