Skip to content

Commit 1a6f5e1

Browse files
committed
Checking classpath
1 parent 2b592cb commit 1a6f5e1

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

src/test/java/net/authorize/sample/SampleCodeTest/TestRunner.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ private static Double getAmount()
9292
double d = (double)(1.05 + (450.0 * rgenerator.nextDouble()));
9393
DecimalFormat df = new DecimalFormat("#.##");
9494
d = Double.valueOf(df.format(d));
95+
System.out.println("AMOUNT : " + d);
9596
return d;
9697
}
9798

@@ -109,6 +110,8 @@ public void TestAllSampleCodes()
109110

110111
BufferedReader reader = null;
111112

113+
System.out.println(System.getProperty("java.class.path"));
114+
112115
try {
113116
reader = new BufferedReader(new FileReader(fileName));
114117
} catch (FileNotFoundException e1) {
@@ -183,7 +186,7 @@ public ANetApiResponse InvokeRunMethod(String className)
183186
{
184187
String fqClassName = "net.authorize.sample." + className;
185188

186-
Class classType = null;
189+
Class<?> classType = null;
187190
try {
188191
classType = Class.forName(fqClassName);
189192
} catch (ClassNotFoundException e1) {
@@ -193,28 +196,19 @@ public ANetApiResponse InvokeRunMethod(String className)
193196

194197
Method runMethod = null;
195198
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) {
201201
// TODO Auto-generated catch block
202202
e1.printStackTrace();
203203
}
204204

205-
try {
205+
try {
206206
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) {
214208
// TODO Auto-generated catch block
215209
e.printStackTrace();
216210
}
217-
return null;
211+
return null;
218212
}
219213

220214
public ANetApiResponse TestValidateCustomerPaymentProfile()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy