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

    StringBuilder validUrnListBuilder = new StringBuilder();
    for (String validUrn : validUrns) {
      validUrnLists.add(validUrn);
      validUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + validUrn + InputKeys.LIST_ITEM_SEPARATOR);

      validUrnListBuilder.append(validUrn);
      validUrnLists.add(validUrnListBuilder.toString());

      validUrnListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      validUrnLists.add(validUrnListBuilder.toString());
    }

    StringBuilder invalidUrnListBuilder = new StringBuilder();
    for (String invalidUrn : invalidUrns) {
      invalidUrnLists.add(invalidUrn);
      invalidUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + invalidUrn + InputKeys.LIST_ITEM_SEPARATOR);

      invalidUrnListBuilder.append(invalidUrn);
      invalidUrnLists.add(invalidUrnListBuilder.toString());

      invalidUrnListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      invalidUrnLists.add(invalidUrnListBuilder.toString());
    }

    for (String validUrn : validUrns) {
      for (String invalidUrn : invalidUrns) {
        invalidUrnLists.add(validUrn + InputKeys.LIST_ITEM_SEPARATOR + invalidUrn);
        invalidUrnLists.add(invalidUrn + InputKeys.LIST_ITEM_SEPARATOR + validUrn);
      }
    }

    System.out.println("Valid URN lists generated:");
    for (String validUrnList : validUrnLists) {
      System.out.println("\t" + validUrnList);
    }
    System.out.println();

    System.out.println("Invalid URN lists generated:");
    for (String invalidUrnList : invalidUrnLists) {
      System.out.println("\t" + invalidUrnList);
    }
    System.out.println();
  }
/**
   * Populates the valid and invalid URN list collections.
   */
Populates the valid and invalid URN list collections.
Populates the valid and invalid URN list collections .
private static void initUrnLists() {
    validUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR);
    validUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);
    validUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR + InputKeys.LIST_ITEM_SEPARATOR);
    StringBuilder validUrnListBuilder = new StringBuilder();
    for (String validUrn : validUrns) {
      validUrnLists.add(validUrn);
      validUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + validUrn + InputKeys.LIST_ITEM_SEPARATOR);
      validUrnListBuilder.append(validUrn);
      validUrnLists.add(validUrnListBuilder.toString());
      validUrnListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      validUrnLists.add(validUrnListBuilder.toString());
    }
    StringBuilder invalidUrnListBuilder = new StringBuilder();
    for (String invalidUrn : invalidUrns) {
      invalidUrnLists.add(invalidUrn);
      invalidUrnLists.add(InputKeys.LIST_ITEM_SEPARATOR + invalidUrn + InputKeys.LIST_ITEM_SEPARATOR);
      invalidUrnListBuilder.append(invalidUrn);
      invalidUrnLists.add(invalidUrnListBuilder.toString());
      invalidUrnListBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);
      invalidUrnLists.add(invalidUrnListBuilder.toString());
    }
    for (String validUrn : validUrns) {
      for (String invalidUrn : invalidUrns) {
        invalidUrnLists.add(validUrn + InputKeys.LIST_ITEM_SEPARATOR + invalidUrn);
        invalidUrnLists.add(invalidUrn + InputKeys.LIST_ITEM_SEPARATOR + validUrn);
      }
    }
    System.out.println("Valid URN lists generated:");
    for (String validUrnList : validUrnLists) {
      System.out.println("\t" + validUrnList);
    }
    System.out.println();
    System.out.println("Invalid URN lists generated:");
    for (String invalidUrnList : invalidUrnLists) {
      System.out.println("\t" + invalidUrnList);
    }
    System.out.println();
  }
private static void initUrnLists ( ) { validUrnLists . add ( InputKeys . LIST_ITEM_SEPARATOR ) ; validUrnLists . add ( InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR ) ; validUrnLists . add ( InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR + InputKeys . LIST_ITEM_SEPARATOR ) ; StringBuilder validUrnListBuilder = new StringBuilder ( ) ; for ( String validUrn : validUrns ) { validUrnLists . add ( validUrn ) ; validUrnLists . add ( InputKeys . LIST_ITEM_SEPARATOR + validUrn + InputKeys . LIST_ITEM_SEPARATOR ) ; validUrnListBuilder . append ( validUrn ) ; validUrnLists . add ( validUrnListBuilder . toString ( ) ) ; validUrnListBuilder . append ( InputKeys . LIST_ITEM_SEPARATOR ) ; validUrnLists . add ( validUrnListBuilder . toString ( ) ) ; } StringBuilder invalidUrnListBuilder = new StringBuilder ( ) ; for ( String invalidUrn : invalidUrns ) { invalidUrnLists . add ( invalidUrn ) ; invalidUrnLists . add ( InputKeys . LIST_ITEM_SEPARATOR + invalidUrn + InputKeys . LIST_ITEM_SEPARATOR ) ; invalidUrnListBuilder . append ( invalidUrn ) ; invalidUrnLists . add ( invalidUrnListBuilder . toString ( ) ) ; invalidUrnListBuilder . append ( InputKeys . LIST_ITEM_SEPARATOR ) ; invalidUrnLists . add ( invalidUrnListBuilder . toString ( ) ) ; } for ( String validUrn : validUrns ) { for ( String invalidUrn : invalidUrns ) { invalidUrnLists . add ( validUrn + InputKeys . LIST_ITEM_SEPARATOR + invalidUrn ) ; invalidUrnLists . add ( invalidUrn + InputKeys . LIST_ITEM_SEPARATOR + validUrn ) ; } } System . out . println ( "Valid URN lists generated:" ) ; for ( String validUrnList : validUrnLists ) { System . out . println ( "\t" + validUrnList ) ; } System . out . println ( ) ; System . out . println ( "Invalid URN lists generated:" ) ; for ( String invalidUrnList : invalidUrnLists ) { System . out . println ( "\t" + invalidUrnList ) ; } System . out . println ( ) ; }
Populates the valid and invalid URN list collections.
Populates the valid and invalid URN list collections .