m2u-upass-core / src / my / com / upass / GemaltoTest.java @ 24:dd5aa1133c23
History | View | Annotate | Download (2.41 KB)
1 |
/**
|
---|---|
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 |
int rc = upc.LoadToken ("TokenOwner", "TokenOwner", "C:\\GEMALTO_127117001000_chk_toSingapore.pskc", "RRRF9U7UTUMCL3GC9EE4", new SimpleDateFormat ("ddMMyyyy").format (new Date ())); |
37 |
System.out.println (rc);
|
38 |
} |
39 |
|
40 |
public void testAssignToken () throws Exception |
41 |
{ |
42 |
int rc = upc.AssignTokenToUser ("TokenOwner", "TokenOwner", "GANE00242927", "testing123"); |
43 |
System.out.println (rc);
|
44 |
} |
45 |
|
46 |
public void testRevokeToken () throws Exception |
47 |
{ |
48 |
int rc = upc.UnassignTokenFromUser ("TokenOwner", "TokenOwner", "testing123"); |
49 |
System.out.println (rc);
|
50 |
} |
51 |
|
52 |
public void testQueryToken () throws Exception |
53 |
{ |
54 |
System.out.println (upc.QueryToken ("testing123")); |
55 |
} |
56 |
|
57 |
public void testDisableToken () throws Exception |
58 |
{ |
59 |
int rc = upc.DisableToken ("TokenOwner", "TokenOwner", "testing123"); |
60 |
System.out.println (rc);
|
61 |
} |
62 |
|
63 |
public void testEnableToken () throws Exception |
64 |
{ |
65 |
int rc = upc.EnableToken ("TokenOwner", "TokenOwner", "testing123"); |
66 |
System.out.println (rc);
|
67 |
} |
68 |
|
69 |
public void testDeleteToken () throws Exception |
70 |
{ |
71 |
int rc = upc.DeleteTokenFromStore ("TokenOwner", "TokenOwner", "GANE00242923"); |
72 |
System.out.println (rc);
|
73 |
} |
74 |
|
75 |
public void testVerifyToken () throws Exception |
76 |
{ |
77 |
int rc = upc.VerifyToken ("testing123", "960665"); |
78 |
System.out.println (rc);
|
79 |
} |
80 |
|
81 |
public void testResetToken () throws Exception |
82 |
{ |
83 |
int rc = upc.ResetToken ("TokenOwner", "TokenOwner", "testing123"); |
84 |
System.out.println (rc);
|
85 |
} |
86 |
|
87 |
public static void main(String[] args) throws Exception |
88 |
{ |
89 |
new GemaltoTest ().testVerifyToken ();
|
90 |
} |
91 |
} |