View Javadoc
1   package com.sun.akuma.test;
2   import java.io.IOException;
3   
4   import org.junit.Assert;
5   import junit.framework.TestCase;
6   
7   import com.sun.akuma.JavaVMArguments;
8   
9   
10  public class ArgvTest extends TestCase {
11  	
12  	public void testSupportByOS() throws IOException{
13  		try{
14  			JavaVMArguments.current();
15  		}catch(UnsupportedOperationException e){
16  			Assert.fail("Your OS isn't supported by Akuma");
17  		}
18  	}
19  	
20  	public void testJavaIsFirstArg() throws IOException{
21  		try{
22  			JavaVMArguments args = JavaVMArguments.current();
23  			Assert.assertTrue(args.size() > 1);
24  			Assert.assertTrue(args.get(0).endsWith("java"));
25  		}catch(UnsupportedOperationException e){
26  			Assert.fail("Your OS isn't supported by Akuma");
27  		}
28  	}
29  	
30  }