< prev index next >

jdk/test/javax/smartcardio/CommandAPDUTest.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8049021
  27  * @summary Test different constructors for CommandAPDU and check CLA,INS,NC,NE,
  28  * P1,and P2
  29  * @compile -addmods java.smartcardio CommandAPDUTest.java
  30  * @run testng/othervm -addmods java.smartcardio CommandAPDUTest
  31  */
  32 import java.nio.ByteBuffer;
  33 import javax.smartcardio.CommandAPDU;
  34 import static org.testng.Assert.*;
  35 import org.testng.annotations.BeforeClass;
  36 import org.testng.annotations.DataProvider;
  37 import org.testng.annotations.Test;
  38 
  39 public class CommandAPDUTest {
  40 
  41     static final byte[] C1 = {(byte) 0x00, (byte) 0xA4, (byte) 0x04,
  42         (byte) 0x00, (byte) 0x07, (byte) 0xA0, (byte) 0x00, (byte) 0x00,
  43         (byte) 0x00, (byte) 0x62, (byte) 0x81, (byte) 0x01, (byte) 0x00};
  44     static int cla, ins, nc, ne, p1, p2;
  45     static byte[] apdu, data;
  46     static CommandAPDU cm1, cm2, cm3, cm4, cm5, cm6, cm7, cm8, cm9;
  47 
  48     @BeforeClass
  49     public static void setUpClass() throws Exception {
  50         //expected values of apdu, data, headers, nc, ne




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8049021
  27  * @summary Test different constructors for CommandAPDU and check CLA,INS,NC,NE,
  28  * P1,and P2
  29  * @compile --add-modules=java.smartcardio CommandAPDUTest.java
  30  * @run testng/othervm --add-modules=java.smartcardio CommandAPDUTest
  31  */
  32 import java.nio.ByteBuffer;
  33 import javax.smartcardio.CommandAPDU;
  34 import static org.testng.Assert.*;
  35 import org.testng.annotations.BeforeClass;
  36 import org.testng.annotations.DataProvider;
  37 import org.testng.annotations.Test;
  38 
  39 public class CommandAPDUTest {
  40 
  41     static final byte[] C1 = {(byte) 0x00, (byte) 0xA4, (byte) 0x04,
  42         (byte) 0x00, (byte) 0x07, (byte) 0xA0, (byte) 0x00, (byte) 0x00,
  43         (byte) 0x00, (byte) 0x62, (byte) 0x81, (byte) 0x01, (byte) 0x00};
  44     static int cla, ins, nc, ne, p1, p2;
  45     static byte[] apdu, data;
  46     static CommandAPDU cm1, cm2, cm3, cm4, cm5, cm6, cm7, cm8, cm9;
  47 
  48     @BeforeClass
  49     public static void setUpClass() throws Exception {
  50         //expected values of apdu, data, headers, nc, ne


< prev index next >