[java-idp-integration-tests] 08/14: Support deviceName capability used to select iOS device
Tom Zeller
tzeller at dragonacea.biz
Thu Jun 17 13:55:52 UTC 2021
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=32801b127e827b428bd703706310e51de3c1fdc1
commit 32801b127e827b428bd703706310e51de3c1fdc1
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Jun 17 08:09:56 2021 -0500
Support deviceName capability used to select iOS device
For example, 'iPhone 12 Pro Max Simulator'.
---
.../java/net/shibboleth/idp/test/BrowserData.java | 32 +++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/src/test/java/net/shibboleth/idp/test/BrowserData.java b/src/test/java/net/shibboleth/idp/test/BrowserData.java
index 17beb19..83fa743 100644
--- a/src/test/java/net/shibboleth/idp/test/BrowserData.java
+++ b/src/test/java/net/shibboleth/idp/test/BrowserData.java
@@ -39,6 +39,9 @@ public class BrowserData {
/** Browser operating system. */
private String browserOS;
+ /** Browser device. */
+ private String browserDevice;
+
/**
* Get the browser name.
*
@@ -66,6 +69,15 @@ public class BrowserData {
return browserOS;
}
+ /**
+ * Get the browser device.
+ *
+ * @return the browser device
+ */
+ @Nullable public String getDevice() {
+ return browserDevice;
+ }
+
/**
* Set the browser name.
*
@@ -102,9 +114,27 @@ public class BrowserData {
return this;
}
+ /**
+ * Set the browser device.
+ *
+ * @param device the browser device
+ *
+ * @return the {@link BrowserData}
+ */
+ public BrowserData setDevice(@Nonnull @NotEmpty final String device) {
+ browserDevice = Constraint.isNotNull(StringSupport.trimOrNull(device), "Device cannot be null nor empty");
+ return this;
+ }
+
/** {@inheritDoc} */
@Override public String toString() {
- return "BrowserData [browser=" + browserName + ", version=" + browserVersion + ", OS=" + browserOS + "]";
+ final StringBuilder stringForm = new StringBuilder("BrowserData {");
+ stringForm.append("platform:").append(browserOS).append(", ");
+ stringForm.append("browser:").append(browserName).append(", ");
+ stringForm.append("version:").append(browserVersion).append(", ");
+ stringForm.append("device:").append(browserDevice);
+ stringForm.append("}");
+ return stringForm.toString();
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list