Skip to content

Commit

Permalink
add format #605
Browse files Browse the repository at this point in the history
(cherry picked from commit a3b867f)

Conflicts:
	terasoluna-gfw-functionaltest-selenium/src/test/java/org/terasoluna/gfw/functionaltest/app/ApServerName.java
  • Loading branch information
btyanagawamg committed Jun 12, 2017
1 parent ec5534d commit 835d4e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
/**
* Enumeration class for identifying application server.
* <p>
* If application server name is not set in application-env.properties,
* {@code UNKNOWN} is set.
* If application server name is not set in application-env.properties, {@code UNKNOWN} is set.
* </p>
*/
public enum ApServerName {
UNKNOWN, JBOSS, TOMCAT, WEBLOGIC
UNKNOWN, JBOSS, TOMCAT, WEBLOGIC
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
*/
public class WebDriverOperations {

private static final Logger logger = LoggerFactory.getLogger(WebDriverOperations.class);
private static final Logger logger = LoggerFactory
.getLogger(WebDriverOperations.class);

protected final WebDriver webDriver;

Expand Down Expand Up @@ -86,11 +87,13 @@ public void setTimeoutForImplicitlyWait(long timeout, TimeUnit timeUnit) {
* @return application server name
*/
public ApServerName getApServerName() {
String serverName = webDriver.findElement(By.id("apServerName")).getText().toUpperCase();
String serverName = webDriver.findElement(By.id("apServerName"))
.getText().toUpperCase();
try {
return ApServerName.valueOf(serverName);
return ApServerName.valueOf(serverName);
} catch (IllegalArgumentException e) {
logger.warn("Unkown application server name:{} is detected.", serverName);
logger.warn("Unkown application server name:{} is detected.",
serverName);
// If server name not defined in the ApServerName class, set it to UNKNOWN.
return ApServerName.UNKNOWN;
}
Expand Down

0 comments on commit 835d4e8

Please sign in to comment.