test/org/ohmage/test/ParameterSets.java
private static void initUsernameLists() {
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR);
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);

    StringBuilder validUsernameListBuilder = new StringBuilder();
    for (String validUsername : validUsernames) {
      validUsernameLists.add(validUsername);

      validUsernameListBuilder.append(validUsername);
      validUsernameListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      validUsernameLists.add(validUsernameListBuilder.toString());
    }

    StringBuilder invalidUsernameListBuilder = new StringBuilder();
    for (String invalidUsername : invalidUsernames) {
      invalidUsernameLists.add(invalidUsername);

      invalidUsernameListBuilder.append(invalidUsername);
      invalidUsernameListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      invalidUsernameLists.add(invalidUsernameListBuilder.toString());
    }

    System.out.println("Valid username lists generated:");
    for (String validUsernameList : validUsernameLists) {
      System.out.println("\t" + validUsernameList);
    }
    System.out.println();

    System.out.println("Invalid username lists generated:");
    for (String invalidUsernameList : invalidUsernameLists) {
      System.out.println("\t" + invalidUsernameList);
    }
    System.out.println();
  }
/**
   * Populates the valid and invalid username lists.
   */
Populates the valid and invalid username lists.
Populates the valid and invalid username lists .
private static void initUsernameLists() {
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR);
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);
    validUsernameLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);
    StringBuilder validUsernameListBuilder = new StringBuilder();
    for (String validUsername : validUsernames) {
      validUsernameLists.add(validUsername);
      validUsernameListBuilder.append(validUsername);
      validUsernameListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      validUsernameLists.add(validUsernameListBuilder.toString());
    }
    StringBuilder invalidUsernameListBuilder = new StringBuilder();
    for (String invalidUsername : invalidUsernames) {
      invalidUsernameLists.add(invalidUsername);
      invalidUsernameListBuilder.append(invalidUsername);
      invalidUsernameListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      invalidUsernameLists.add(invalidUsernameListBuilder.toString());
    }
    System.out.println("Valid username lists generated:");
    for (String validUsernameList : validUsernameLists) {
      System.out.println("\t" + validUsernameList);
    }
    System.out.println();
    System.out.println("Invalid username lists generated:");
    for (String invalidUsernameList : invalidUsernameLists) {
      System.out.println("\t" + invalidUsernameList);
    }
    System.out.println();
  }
private static void initUsernameLists ( ) { validUsernameLists . add ( InputKeys . LIST_ITEM_SEPARATOR ) ; validUsernameLists . add ( InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR ) ; validUsernameLists . add ( InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR ) ; StringBuilder validUsernameListBuilder = new StringBuilder ( ) ; for ( String validUsername : validUsernames ) { validUsernameLists . add ( validUsername ) ; validUsernameListBuilder . append ( validUsername ) ; validUsernameListBuilder . append ( InputKeys . LIST_ITEM_SEPARATOR ) ; validUsernameLists . add ( validUsernameListBuilder . toString ( ) ) ; } StringBuilder invalidUsernameListBuilder = new StringBuilder ( ) ; for ( String invalidUsername : invalidUsernames ) { invalidUsernameLists . add ( invalidUsername ) ; invalidUsernameListBuilder . append ( invalidUsername ) ; invalidUsernameListBuilder . append ( InputKeys . LIST_ITEM_SEPARATOR ) ; invalidUsernameLists . add ( invalidUsernameListBuilder . toString ( ) ) ; } System . out . println ( "Valid username lists generated:" ) ; for ( String validUsernameList : validUsernameLists ) { System . out . println ( "\t" + validUsernameList ) ; } System . out . println ( ) ; System . out . println ( "Invalid username lists generated:" ) ; for ( String invalidUsernameList : invalidUsernameLists ) { System . out . println ( "\t" + invalidUsernameList ) ; } System . out . println ( ) ; }
Populates the valid and invalid username lists.
Populates the valid and invalid username lists .