< prev index next >

test/sun/tools/jinfo/JInfoLauncherTest.java

Print this page
rev 11832 : 8078896: Add @modules as needed to the jdk_svc tests
Reviewed-by: alanb, mchung


  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import org.testng.annotations.Test;
  27 import org.testng.annotations.BeforeClass;
  28 import sun.tools.jinfo.JInfo;
  29 
  30 import java.lang.reflect.Constructor;
  31 import java.lang.reflect.Field;
  32 import java.util.Arrays;
  33 
  34 import static org.testng.Assert.*;
  35 
  36 /**
  37  * @test
  38  * @bug 8039080

  39  * @run testng JInfoLauncherTest
  40  * @summary Test JInfo launcher argument parsing
  41  */
  42 @Test
  43 public class JInfoLauncherTest {
  44     public static final String VALIDATION_EXCEPTION_CLSNAME =
  45                                 IllegalArgumentException.class.getName();
  46 
  47     private Constructor<JInfo> jInfoConstructor;
  48     private Field fldUseSA;
  49 
  50     @BeforeClass
  51     public void setup() throws Exception {
  52         jInfoConstructor = JInfo.class.getDeclaredConstructor(String[].class);
  53         jInfoConstructor.setAccessible(true);
  54         fldUseSA = JInfo.class.getDeclaredField("useSA");
  55         fldUseSA.setAccessible(true);
  56     }
  57 
  58     private JInfo newJInfo(String[] args) throws Exception {




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import org.testng.annotations.Test;
  27 import org.testng.annotations.BeforeClass;
  28 import sun.tools.jinfo.JInfo;
  29 
  30 import java.lang.reflect.Constructor;
  31 import java.lang.reflect.Field;
  32 import java.util.Arrays;
  33 
  34 import static org.testng.Assert.*;
  35 
  36 /**
  37  * @test
  38  * @bug 8039080
  39  * @modules jdk.jcmd/sun.tools.jinfo
  40  * @run testng JInfoLauncherTest
  41  * @summary Test JInfo launcher argument parsing
  42  */
  43 @Test
  44 public class JInfoLauncherTest {
  45     public static final String VALIDATION_EXCEPTION_CLSNAME =
  46                                 IllegalArgumentException.class.getName();
  47 
  48     private Constructor<JInfo> jInfoConstructor;
  49     private Field fldUseSA;
  50 
  51     @BeforeClass
  52     public void setup() throws Exception {
  53         jInfoConstructor = JInfo.class.getDeclaredConstructor(String[].class);
  54         jInfoConstructor.setAccessible(true);
  55         fldUseSA = JInfo.class.getDeclaredField("useSA");
  56         fldUseSA.setAccessible(true);
  57     }
  58 
  59     private JInfo newJInfo(String[] args) throws Exception {


< prev index next >