From 695a5fdf4ec9009d4fee2c9fddb5c975808ea4e1 Mon Sep 17 00:00:00 2001 From: Brad Nicholes Date: Mon, 1 May 2023 11:35:52 -0600 Subject: [PATCH] Fix test options --- .../safeguard/safeguardclient/SafeguardTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/safeguardjavaclient/src/main/java/com/oneidentity/safeguard/safeguardclient/SafeguardTests.java b/tests/safeguardjavaclient/src/main/java/com/oneidentity/safeguard/safeguardclient/SafeguardTests.java index 505379a..703074a 100644 --- a/tests/safeguardjavaclient/src/main/java/com/oneidentity/safeguard/safeguardclient/SafeguardTests.java +++ b/tests/safeguardjavaclient/src/main/java/com/oneidentity/safeguard/safeguardclient/SafeguardTests.java @@ -134,17 +134,17 @@ public ISafeguardConnection safeguardConnectByToken() { ISafeguardConnection connection = null; String address = readLine("SPP address: ", null); - String token = readLine("Token:", "local"); + String token = readLine("Token:", null); boolean withCertValidator = readLine("With Certificate Validator(y/n): ", "n").equalsIgnoreCase("y"); boolean ignoreSsl = readLine("Ignore SSL(y/n): ", "y").equalsIgnoreCase("y"); try { if (withCertValidator) { - connection = Safeguard.connect(address, token, new CertificateValidator(), null); + connection = Safeguard.connect(address, token.toCharArray(), new CertificateValidator(), null); } else { - connection = Safeguard.connect(address, token, null, ignoreSsl); + connection = Safeguard.connect(address, token.toCharArray(), null, ignoreSsl); } - } catch (ObjectDisposedException | SafeguardForJavaException ex) { + } catch (ArgumentException ex) { System.out.println("\t[ERROR]Connection failed: " + ex.getMessage()); } catch (Exception ex) { System.out.println("\t[ERROR]Connection failed: " + ex.getMessage()); @@ -513,7 +513,7 @@ public void safeguardTestEventListener(ISafeguardEventListener eventListener) { return; } - String e = readLine("Comma delimited events: ", "UserCreated,UserDeleted"); + String e = readLine("Comma delimited events: ", "UserCreated,UserDeleted,TestConnectionFailed,TestConnectionStarted,TestConnectionSucceeded"); try { String[] events = e.split(",");