Tabnine Logo
ConfigurationValue.getDefaultValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getDefaultValue
method
in
org.finra.herd.model.dto.ConfigurationValue

Best Java code snippets using org.finra.herd.model.dto.ConfigurationValue.getDefaultValue (Showing top 15 results out of 315)

origin: org.finra.herd/herd-core

Object genericDefaultValue = configurationValue.getDefaultValue();
origin: FINRAOS/herd

Object genericDefaultValue = configurationValue.getDefaultValue();
origin: FINRAOS/herd

@Test
public void testGetPropertyInstance()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  String value = configurationHelper.getProperty(configurationValue, String.class);
  assertEquals("value", configurationValue.getDefaultValue(), value);
}
origin: FINRAOS/herd

@Test
public void testGetRequiredProperty()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  String value = configurationHelper.getRequiredProperty(configurationValue);
  assertEquals(configurationValue.getDefaultValue(), value);
}
origin: FINRAOS/herd

@Test
public void testGetPropertyInstanceNoTargetType()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  String value = configurationHelper.getProperty(configurationValue);
  assertEquals("value", configurationValue.getDefaultValue(), value);
}
origin: FINRAOS/herd

@Test
public void testGetPropertyThrowsWhenDefaultTypeDoesNotMatch()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  Class<?> expectedDefaultType = configurationValue.getDefaultValue().getClass();
  Class<?> givenType = Integer.class;
  MockEnvironment environment = new MockEnvironment();
  try
  {
    ConfigurationHelper.getProperty(configurationValue, givenType, environment);
    fail("expected IllegalArgumentException, but no exception was thrown");
  }
  catch (Exception e)
  {
    assertEquals("thrown exception type", IllegalStateException.class, e.getClass());
    assertEquals("thrown exception message",
      "targetType \"" + givenType + "\" is not assignable from the default value of type \"" + expectedDefaultType + "\" for configuration value " +
        "\"HERD_ENVIRONMENT\".", e.getMessage());
  }
}
origin: FINRAOS/herd

@Test
public void testGetPropertyNoTargetType()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  MockEnvironment environment = new MockEnvironment();
  String value = ConfigurationHelper.getProperty(configurationValue, environment);
  assertEquals("value", configurationValue.getDefaultValue(), value);
}
origin: FINRAOS/herd

LdapQuery ldapQuery = query().where((String) ConfigurationValue.LDAP_ATTRIBUTE_USER_ID.getDefaultValue()).is(USER_ID);
  new SubjectMatterExpertDaoImpl.SubjectMatterExpertContactDetailsMapper((String) ConfigurationValue.LDAP_ATTRIBUTE_USER_FULL_NAME.getDefaultValue(),
    (String) ConfigurationValue.LDAP_ATTRIBUTE_USER_JOB_TITLE.getDefaultValue(),
    (String) ConfigurationValue.LDAP_ATTRIBUTE_USER_EMAIL_ADDRESS.getDefaultValue(),
    (String) ConfigurationValue.LDAP_ATTRIBUTE_USER_TELEPHONE_NUMBER.getDefaultValue());
origin: FINRAOS/herd

  .thenReturn((String) ConfigurationValue.FIELD_DATA_DELIMITER.getDefaultValue());
when(awsClientFactory.getEmrClient(awsParamsDto)).thenReturn(amazonElasticMapReduceClient);
when(emrOperations.listEmrClusters(amazonElasticMapReduceClient, listClustersRequest)).thenReturn(listClusterResultWithMarker);
origin: FINRAOS/herd

@Test
public void testGetPropertyReturnDefaultWhenPropertyDoesNotExists()
{
  ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT;
  String expectedValue = (String) configurationValue.getDefaultValue();
  MockEnvironment environment = new MockEnvironment();
  environment.setProperty(configurationValue.getKey(), expectedValue);
  String value = ConfigurationHelper.getProperty(configurationValue, String.class, environment);
  assertNotNull("value", value);
  assertEquals("value", expectedValue, value);
}
origin: FINRAOS/herd

ConfigurationValue.S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE.getDefaultValue(), STORAGE_NAME, INVALID_BOOLEAN_VALUE), e.getMessage());
origin: FINRAOS/herd

@Test
public void testPrepareToInitiateRestoreMissingOptionalParameters() throws Exception
{
  // Create a business object data key without sub-partition values.
  BusinessObjectDataKey businessObjectDataKey =
    new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
      NO_SUBPARTITION_VALUES, DATA_VERSION);
  // Create database entities required for testing.
  BusinessObjectDataEntity businessObjectDataEntity =
    businessObjectDataServiceTestHelper.createDatabaseEntitiesForInitiateRestoreTesting(businessObjectDataKey);
  // Execute a before step for the initiate a business object data restore request for business object data without sub-partition values.
  BusinessObjectDataRestoreDto storagePolicyTransitionParamsDto =
    businessObjectDataInitiateRestoreHelperService.prepareToInitiateRestore(businessObjectDataKey, NO_EXPIRATION_IN_DAYS);
  // Validate the returned object.
  assertEquals(businessObjectDataKey, storagePolicyTransitionParamsDto.getBusinessObjectDataKey());
  // Validate that restore expiration time is set correctly on the storage unit.
  StorageUnitEntity storageUnitEntity = storageUnitDaoHelper.getStorageUnitEntity(STORAGE_NAME, businessObjectDataEntity);
  assertNotNull(storageUnitEntity.getRestoreExpirationOn());
  Long differenceInDays =
    TimeUnit.DAYS.convert(storageUnitEntity.getRestoreExpirationOn().getTime() - storageUnitEntity.getCreatedOn().getTime(), TimeUnit.MILLISECONDS);
  assertTrue((Integer) ConfigurationValue.BDATA_RESTORE_EXPIRATION_IN_DAYS_DEFAULT.getDefaultValue() - differenceInDays <= 1);
}
origin: FINRAOS/herd

  .thenReturn((String) ConfigurationValue.S3_STAGING_RESOURCE_LOCATION.getDefaultValue());
when(emrHelper.getS3StagingLocation()).thenReturn(S3_STAGING_LOCATION);
when(xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, EMR_CLUSTER_CONFIGURATION)).thenReturn(emrClusterDefinition);
origin: FINRAOS/herd

@Test
public void testGetPropertyReturnDefaultWhenValueConversionFails() throws Exception
{
  ConfigurationValue configurationValue = ConfigurationValue.BUSINESS_OBJECT_DATA_GET_ALL_MAX_RESULT_COUNT;
  Integer expectedValue = (Integer) configurationValue.getDefaultValue();
  MockEnvironment environment = new MockEnvironment();
  environment.setProperty(configurationValue.getKey(), "NOT_AN_INTEGER");
  executeWithoutLogging(ConfigurationHelper.class, () ->
  {
    Integer value = ConfigurationHelper.getProperty(configurationValue, Integer.class, environment);
    assertNotNull("value", value);
    assertEquals("value", expectedValue, value);
  });
}
origin: FINRAOS/herd

Tag expectedTag = new Tag((String) ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_KEY.getDefaultValue(),
  (String) ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_VALUE.getDefaultValue());
org.finra.herd.model.dtoConfigurationValuegetDefaultValue

Popular methods of ConfigurationValue

  • getKey

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 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