@@ -92,6 +92,7 @@ private static Double getAmount()
92
92
double d = (double )(1.05 + (450.0 * rgenerator .nextDouble ()));
93
93
DecimalFormat df = new DecimalFormat ("#.##" );
94
94
d = Double .valueOf (df .format (d ));
95
+ System .out .println ("AMOUNT : " + d );
95
96
return d ;
96
97
}
97
98
@@ -109,6 +110,8 @@ public void TestAllSampleCodes()
109
110
110
111
BufferedReader reader = null ;
111
112
113
+ System .out .println (System .getProperty ("java.class.path" ));
114
+
112
115
try {
113
116
reader = new BufferedReader (new FileReader (fileName ));
114
117
} catch (FileNotFoundException e1 ) {
@@ -183,7 +186,7 @@ public ANetApiResponse InvokeRunMethod(String className)
183
186
{
184
187
String fqClassName = "net.authorize.sample." + className ;
185
188
186
- Class classType = null ;
189
+ Class <?> classType = null ;
187
190
try {
188
191
classType = Class .forName (fqClassName );
189
192
} catch (ClassNotFoundException e1 ) {
@@ -193,28 +196,19 @@ public ANetApiResponse InvokeRunMethod(String className)
193
196
194
197
Method runMethod = null ;
195
198
try {
196
- runMethod = classType .getMethod ("run" ,String .class , String .class );
197
- } catch (NoSuchMethodException e1 ) {
198
- // TODO Auto-generated catch block
199
- e1 .printStackTrace ();
200
- } catch (SecurityException e1 ) {
199
+ runMethod = classType .getMethod ("run" , String .class , String .class );
200
+ } catch (NoSuchMethodException | SecurityException e1 ) {
201
201
// TODO Auto-generated catch block
202
202
e1 .printStackTrace ();
203
203
}
204
204
205
- try {
205
+ try {
206
206
return (ANetApiResponse )runMethod .invoke (null , Constants .API_LOGIN_ID , Constants .TRANSACTION_KEY );
207
- } catch (IllegalAccessException e ) {
208
- // TODO Auto-generated catch block
209
- e .printStackTrace ();
210
- } catch (IllegalArgumentException e ) {
211
- // TODO Auto-generated catch block
212
- e .printStackTrace ();
213
- } catch (InvocationTargetException e ) {
207
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e ) {
214
208
// TODO Auto-generated catch block
215
209
e .printStackTrace ();
216
210
}
217
- return null ;
211
+ return null ;
218
212
}
219
213
220
214
public ANetApiResponse TestValidateCustomerPaymentProfile ()
0 commit comments