Tabnine Logo
BusinessObjectDataHelper.getStorageUnitByStorageName
Code IndexAdd Tabnine to your IDE (free)

How to use
getStorageUnitByStorageName
method
in
org.finra.herd.service.helper.BusinessObjectDataHelper

Best Java code snippets using org.finra.herd.service.helper.BusinessObjectDataHelper.getStorageUnitByStorageName (Showing top 6 results out of 315)

origin: FINRAOS/herd

@Test
public void getStorageUnitByStorageNameStorageUnitNoExists()
{
  String testStorageName = "I_DO_NOT_EXIST";
  // Try to get a non-existing storage unit.
  try
  {
    businessObjectDataHelper.getStorageUnitByStorageName(
      new BusinessObjectData(INTEGER_VALUE, BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_KEY,
        PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, LATEST_VERSION_FLAG_SET, BusinessObjectDataStatusEntity.VALID, NO_STORAGE_UNITS,
        NO_ATTRIBUTES, NO_BUSINESS_OBJECT_DATA_PARENTS, NO_BUSINESS_OBJECT_DATA_CHILDREN, NO_BUSINESS_OBJECT_DATA_STATUS_HISTORY,
        NO_RETENTION_EXPIRATION_DATE), testStorageName);
    fail("Should throw a IllegalStateException when storage unit does not exist.");
  }
  catch (IllegalStateException e)
  {
    assertEquals(String.format("Business object data has no storage unit with storage name \"%s\".", testStorageName), e.getMessage());
  }
}
origin: FINRAOS/herd

StorageUnit storageUnit = businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, storageName);
origin: FINRAOS/herd

@Test
public void getStorageUnitByStorageName()
{
  // Create business object data with several test storage units.
  BusinessObjectData businessObjectData = new BusinessObjectData();
  List<String> testStorageNames = Arrays.asList("Storage_1", "storage-2", "STORAGE3");
  List<StorageUnit> storageUnits = new ArrayList<>();
  businessObjectData.setStorageUnits(storageUnits);
  for (String testStorageName : testStorageNames)
  {
    StorageUnit storageUnit = new StorageUnit();
    storageUnits.add(storageUnit);
    Storage storage = new Storage();
    storageUnit.setStorage(storage);
    storage.setName(testStorageName);
  }
  // Validate that we can find all storage units regardless of the storage name case.
  for (String testStorageName : testStorageNames)
  {
    assertEquals(testStorageName, businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName).getStorage().getName());
    assertEquals(testStorageName,
      businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName.toUpperCase()).getStorage().getName());
    assertEquals(testStorageName,
      businessObjectDataHelper.getStorageUnitByStorageName(businessObjectData, testStorageName.toLowerCase()).getStorage().getName());
  }
}
origin: FINRAOS/herd

when(mockBusinessObjectDataHelper.getStorageUnitByStorageName(any(), any())).thenReturn(storageUnit);
when(mockDownloaderWebClient.getS3KeyPrefix(any())).thenReturn(s3KeyPrefixInformation);
when(mockDownloaderWebClient.getStorageUnitDownloadCredential(any(), any())).thenReturn(new StorageUnitDownloadCredential(
origin: FINRAOS/herd

when(mockBusinessObjectDataHelper.getStorageUnitByStorageName(any(), any())).thenReturn(storageUnit);
when(mockDownloaderWebClient.getS3KeyPrefix(any())).thenReturn(s3KeyPrefixInformation);
when(mockS3Service.downloadDirectory(any())).then(new Answer<S3FileTransferResultsDto>()
origin: FINRAOS/herd

when(mockBusinessObjectDataHelper.getStorageUnitByStorageName(any(), any())).thenReturn(storageUnit);
when(mockDownloaderWebClient.getS3KeyPrefix(any())).thenReturn(s3KeyPrefixInformation);
when(mockS3Service.downloadDirectory(any())).then(new Answer<S3FileTransferResultsDto>()
org.finra.herd.service.helperBusinessObjectDataHelpergetStorageUnitByStorageName

Javadoc

Gets a storage unit by storage name (case insensitive).

Popular methods of BusinessObjectDataHelper

  • getBusinessObjectDataKey
    Returns a business object data key for the business object data entity.
  • businessObjectDataKeyToString
    Returns a string representation of the business object data key.
  • businessObjectDataEntityAltKeyToString
    Returns a string representation of the alternate key values for the business object data entity.
  • createBusinessObjectDataFromEntity
    Creates the business object data from the persisted entity.
  • createBusinessObjectDataKeyFromEntity
    Creates a business object data key from a business object data entity.
  • createBusinessObjectDataKeyFromStorageUnitKey
    Creates a business object data key from a storage unit key.
  • getDateFromString
    Gets a date in a date format from a string format or null if one wasn't specified. The format of the
  • getSubPartitionValues
    Gets the sub-partition values for the specified business object data entity.
  • validateBusinessObjectDataKey
    Validates the business object data key. This method also trims the key parameters.
  • validateRegistrationDateRangeFilter
    Validates a registration date range filter. This method makes sure that a registration date range fi
  • validateSubPartitionValues
    Validates a list of sub-partition values. This method also trims the sub-partition values.
  • <init>
  • validateSubPartitionValues,
  • <init>,
  • assertBusinessObjectDataStatusEquals,
  • createBusinessObjectDataCreateRequest,
  • createBusinessObjectDataKey,
  • getPartitionFilter,
  • getPartitionValue,
  • getPrimaryAndSubPartitionValues,
  • validatePartitionValueFilters

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now