public String getStatusCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(statusCommandInfo.stdoutSearchToken)) { return null; } else { return statusCommandInfo.stdoutSearchToken; } }
/** * Get the MD5 sum of a content passed as String * * @param data * @return the MD5 sum */ public static String md5sum( String data ) { byte[] defaultBytes = data.getBytes(); try { MessageDigest algorithm = MessageDigest.getInstance("MD5"); algorithm.reset(); algorithm.update(defaultBytes); byte messageDigest[] = algorithm.digest(); return byteArray2Hex(messageDigest); } catch (NoSuchAlgorithmException nsae) { throw new RuntimeException(nsae); } }
/** * Set the authentication username and password used for HTTP Basic, HTTP Digest, * or SPNEGO authentication. * * @param username The username * @param password The password */ @PublicAtsApi public void setAuthorization( String username, String password ) { if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password)) { this.username = username; this.password = password; invalidateInternalClient(); } }
if (columnDescription.getType() != null && (columnDescription.isTypeBinary())) { recordValueString = "md5:" + StringUtils.md5sum(recordValueString);
/** * Verify the specified value is NOT selected * * @param notExpectedValue * @throws VerificationException if the element doesn't exist * @throws VerifyNotEqualityException if the verification fails */ @Override @PublicAtsApi public void verifyNotValue( String notExpectedValue ) { new SwingElementState(this).waitToBecomeExisting(); JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this)); String selectedValue = (String) listFixture.component().getSelectedValue(); if ( (notExpectedValue == null && selectedValue == null) || (StringUtils.isNotNullAndEquals(selectedValue, notExpectedValue))) { throw new VerifyNotEqualityException(notExpectedValue, this); } } }
public String getStopCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(stopCommandInfo.stdoutSearchToken)) { return null; } else { return stopCommandInfo.stdoutSearchToken; } }
/** * Set the authentication username and password used for HTTP Basic, HTTP Digest, * or SPNEGO authentication. * * @param username The username * @param password The password * @param authType Set to 'always' if the HTTP Basic Authorization header should * be sent preemptively, i.e. without waiting for the server challenge. */ @PublicAtsApi public void setAuthorization( String username, String password, AuthType authType ) { if (!StringUtils.equals(this.username, username) || !StringUtils.equals(this.password, password) || this.authType != authType) { this.username = username; this.password = password; this.authType = authType; invalidateInternalClient(); } }
return StringUtils.byteArray2Hex(digest.digest());
public String getJavaExecutableToken() { String javaExeToken = ""; if (!StringUtils.isNullOrEmpty(javaExecutable)) { javaExeToken = " -java_exec \"" + javaExecutable + "\""; } return javaExeToken; }
public ShellCommand( String alias, String command ) { if (!StringUtils.isNullOrEmpty(alias)) { this.alias = alias; } this.command = command; }
public String getPortToken() { String portToken = ""; if (!StringUtils.isNullOrEmpty(port)) { portToken = " -port " + port; } return portToken; }
public String getStatusCommand() { if (StringUtils.isNullOrEmpty(statusCommandInfo.command)) { return null; } else { return statusCommandInfo.command; } }
public String getStartCommandStdOutSearchToken() { if (StringUtils.isNullOrEmpty(startCommandInfo.stdoutSearchToken)) { return null; } else { return startCommandInfo.stdoutSearchToken; } }
public String getStatusCommandUrl() { if (StringUtils.isNullOrEmpty(statusCommandInfo.url)) { return null; } else { return statusCommandInfo.url; } }
public String getStatusCommandUrlSearchToken() { if (StringUtils.isNullOrEmpty(statusCommandInfo.urlSearchToken)) { return null; } else { return statusCommandInfo.urlSearchToken; } }
public String getStopCommand() { if (StringUtils.isNullOrEmpty(stopCommandInfo.command)) { return null; } else { return stopCommandInfo.command; } }
public String getMemoryToken() { String memoryToken = ""; if (!StringUtils.isNullOrEmpty(memory)) { memoryToken = " -memory " + memory; } return memoryToken; }
public String getStartCommand() { if (StringUtils.isNullOrEmpty(startCommandInfo.command)) { return null; } else { return startCommandInfo.command; } }
@Override public void setName( String newName ) { /* * This method is called only when loading a snapshot from a file. * In such case, user can overwrite the snapshot name coming from the file. */ if (StringUtils.isNullOrEmpty(name)) { // user wants to use the snapshot name as comes from the file return; } else { // user wants to overwrite the snapshot name coming from the file. this.name = newName; } }
public UpdateTestcaseEvent( String loggerFQCN, Logger logger, int testcaseId, String suiteFullName, String suiteSimpleName, String scenarioName, String inputArguments, String scenarioDescription, String userNote, int testcaseResult, long timestamp ) { super(loggerFQCN, logger, "Update testcase with id '" + testcaseId + "'", suiteFullName, suiteSimpleName, scenarioName, inputArguments, scenarioDescription, LoggingEventType.UPDATE_TEST_CASE); this.testcaseId = testcaseId; this.testcaseResult = testcaseResult; this.userNote = userNote; if (StringUtils.isNullOrEmpty(scenarioName) || StringUtils.isNullOrEmpty(inputArguments)) { this.testcaseName = null; } }