Ejemplo n.º 1
0
 /**
  * Runs random string function with arguments.
  *
  * @param numberOfLetters
  * @param notationMethod
  * @param useNumbers
  * @return
  */
 public static String randomString(
     Long numberOfLetters, String notationMethod, boolean useNumbers) {
   return new RandomStringFunction()
       .execute(
           Arrays.asList(
               String.valueOf(numberOfLetters), notationMethod, String.valueOf(useNumbers)),
           null);
 }
Ejemplo n.º 2
0
 /**
  * Runs create digest auth header function with arguments.
  *
  * @return
  */
 public static String digestAuthHeader(
     String username,
     String password,
     String realm,
     String noncekey,
     String method,
     String uri,
     String opaque,
     String algorithm) {
   return new DigestAuthHeaderFunction()
       .execute(
           Arrays.asList(username, password, realm, noncekey, method, uri, opaque, algorithm),
           null);
 }
Ejemplo n.º 3
0
 /**
  * Runs encode base 64 function with arguments.
  *
  * @return
  */
 public static String encodeBase64(String content, Charset charset) {
   return new EncodeBase64Function().execute(Arrays.asList(content, charset.displayName()), null);
 }
Ejemplo n.º 4
0
 /**
  * Runs change date function with arguments.
  *
  * @param date
  * @param dateOffset
  * @return
  */
 public static String changeDate(String date, String dateOffset) {
   return new ChangeDateFunction().execute(Arrays.asList(date, dateOffset), null);
 }
Ejemplo n.º 5
0
 /**
  * Runs random number function with arguments.
  *
  * @param length
  * @param padding
  * @return
  */
 public static String randomNumber(Long length, boolean padding) {
   return new RandomNumberFunction()
       .execute(Arrays.asList(String.valueOf(length), String.valueOf(padding)), null);
 }