m2u-upass-core / src / my / com / upass / GemaltoTest.java @ 62:9571b0589c96
History | View | Annotate | Download (2.41 KB)
1 | 0:02300db8682b | hadi | /**
|
---|---|---|---|
2 | * Copyright (c) 2010 Penril Datability (M) Sdn Bhd All rights reserved.
|
||
3 | *
|
||
4 | * This software is copyrighted. Under the copyright laws, this software
|
||
5 | * may not be copied, in whole or in part, without prior written consent
|
||
6 | * of Penril Datability (M) Sdn Bhd or its assignees. This software is
|
||
7 | * provided under the terms of a license between Penril Datability (M)
|
||
8 | * Sdn Bhd and the recipient, and its use is subject to the terms of that
|
||
9 | * license.
|
||
10 | */
|
||
11 | package my.com.upass; |
||
12 | |||
13 | |||
14 | import java.text.SimpleDateFormat; |
||
15 | import java.util.Date; |
||
16 | |||
17 | /**
|
||
18 | * PROGRAMMER: Danniell
|
||
19 | * CHANGE-NO:
|
||
20 | * TASK-NO:
|
||
21 | * DATE CREATED: Jan 8, 2013
|
||
22 | * TAG AS:
|
||
23 | * REASON(S):
|
||
24 | * MODIFICATION:
|
||
25 | */
|
||
26 | |||
27 | /**
|
||
28 | * <Class description>
|
||
29 | */
|
||
30 | public class GemaltoTest |
||
31 | { |
||
32 | public UPassControllerV2 upc = new UPassControllerV2 (); |
||
33 | |||
34 | public void testLoadToken () throws Exception |
||
35 | { |
||
36 | 54:2a8606bdbe0a | hadi | int rc = upc.loadToken ("TokenOwner", "TokenOwner", "C:\\GEMALTO_127117001000_chk_toSingapore.pskc", "RRRF9U7UTUMCL3GC9EE4", new SimpleDateFormat ("ddMMyyyy").format (new Date ())); |
37 | 0:02300db8682b | hadi | System.out.println (rc);
|
38 | } |
||
39 | |||
40 | public void testAssignToken () throws Exception |
||
41 | { |
||
42 | 54:2a8606bdbe0a | hadi | int rc = upc.assignTokenToUser ("TokenOwner", "TokenOwner", "GANE00242927", "testing123"); |
43 | 0:02300db8682b | hadi | System.out.println (rc);
|
44 | } |
||
45 | |||
46 | public void testRevokeToken () throws Exception |
||
47 | { |
||
48 | 54:2a8606bdbe0a | hadi | int rc = upc.unassignTokenFromUser ("TokenOwner", "TokenOwner", "testing123"); |
49 | 0:02300db8682b | hadi | System.out.println (rc);
|
50 | } |
||
51 | |||
52 | public void testQueryToken () throws Exception |
||
53 | { |
||
54 | 54:2a8606bdbe0a | hadi | System.out.println (upc.queryToken ("testing123")); |
55 | 0:02300db8682b | hadi | } |
56 | |||
57 | public void testDisableToken () throws Exception |
||
58 | { |
||
59 | 54:2a8606bdbe0a | hadi | int rc = upc.disableToken ("TokenOwner", "TokenOwner", "testing123"); |
60 | 0:02300db8682b | hadi | System.out.println (rc);
|
61 | } |
||
62 | |||
63 | public void testEnableToken () throws Exception |
||
64 | { |
||
65 | 54:2a8606bdbe0a | hadi | int rc = upc.enableToken ("TokenOwner", "TokenOwner", "testing123"); |
66 | 0:02300db8682b | hadi | System.out.println (rc);
|
67 | } |
||
68 | |||
69 | public void testDeleteToken () throws Exception |
||
70 | { |
||
71 | 54:2a8606bdbe0a | hadi | int rc = upc.deleteTokenFromStore ("TokenOwner", "TokenOwner", "GANE00242923"); |
72 | 0:02300db8682b | hadi | System.out.println (rc);
|
73 | } |
||
74 | |||
75 | public void testVerifyToken () throws Exception |
||
76 | { |
||
77 | 54:2a8606bdbe0a | hadi | int rc = upc.verifyToken ("testing123", "960665"); |
78 | 0:02300db8682b | hadi | System.out.println (rc);
|
79 | } |
||
80 | |||
81 | public void testResetToken () throws Exception |
||
82 | { |
||
83 | 54:2a8606bdbe0a | hadi | int rc = upc.resetToken ("TokenOwner", "TokenOwner", "testing123"); |
84 | 0:02300db8682b | hadi | System.out.println (rc);
|
85 | } |
||
86 | |||
87 | public static void main(String[] args) throws Exception |
||
88 | { |
||
89 | new GemaltoTest ().testVerifyToken ();
|
||
90 | } |
||
91 | } |