Search in sources :

Example 6 with BusinessObjectDefinitionTag

use of org.finra.herd.model.api.xml.BusinessObjectDefinitionTag in project herd by FINRAOS.

the class BusinessObjectDefinitionTagServiceTest method testDeleteBusinessObjectDefinitionTagTrimParameters.

@Test
public void testDeleteBusinessObjectDefinitionTagTrimParameters() {
    // Create a business object definition tag key.
    BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Create and persist a business object definition tag entity.
    BusinessObjectDefinitionTagEntity businessObjectDefinitionTagEntity = businessObjectDefinitionTagDaoTestHelper.createBusinessObjectDefinitionTagEntity(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Validate that this business object definition tag exists.
    assertNotNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
    // Delete this business object definition tag using input parameters with leading and trailing empty spaces.
    BusinessObjectDefinitionTag result = businessObjectDefinitionTagService.deleteBusinessObjectDefinitionTag(new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(addWhitespace(BDEF_NAMESPACE), addWhitespace(BDEF_NAME)), new TagKey(addWhitespace(TAG_TYPE), addWhitespace(TAG_CODE))));
    // Validate the returned object.
    assertEquals(new BusinessObjectDefinitionTag(businessObjectDefinitionTagEntity.getId(), businessObjectDefinitionTagKey), result);
    // Ensure that this business object definition tag is no longer there.
    assertNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
}
Also used : BusinessObjectDefinitionTag(org.finra.herd.model.api.xml.BusinessObjectDefinitionTag) BusinessObjectDefinitionKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) TagKey(org.finra.herd.model.api.xml.TagKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) BusinessObjectDefinitionTagEntity(org.finra.herd.model.jpa.BusinessObjectDefinitionTagEntity) Test(org.junit.Test)

Example 7 with BusinessObjectDefinitionTag

use of org.finra.herd.model.api.xml.BusinessObjectDefinitionTag in project herd by FINRAOS.

the class BusinessObjectDefinitionTagServiceTest method testDeleteBusinessObjectDefinitionTag.

@Test
public void testDeleteBusinessObjectDefinitionTag() {
    // Create a business object definition tag key.
    BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Create and persist a business object definition tag entity.
    BusinessObjectDefinitionTagEntity businessObjectDefinitionTagEntity = businessObjectDefinitionTagDaoTestHelper.createBusinessObjectDefinitionTagEntity(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Validate that this business object definition tag exists.
    assertNotNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
    // Delete this business object definition tag.
    BusinessObjectDefinitionTag result = businessObjectDefinitionTagService.deleteBusinessObjectDefinitionTag(businessObjectDefinitionTagKey);
    // Validate the returned object.
    assertEquals(new BusinessObjectDefinitionTag(businessObjectDefinitionTagEntity.getId(), businessObjectDefinitionTagKey), result);
    // Ensure that this business object definition tag is no longer there.
    assertNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
}
Also used : BusinessObjectDefinitionTag(org.finra.herd.model.api.xml.BusinessObjectDefinitionTag) BusinessObjectDefinitionKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) TagKey(org.finra.herd.model.api.xml.TagKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) BusinessObjectDefinitionTagEntity(org.finra.herd.model.jpa.BusinessObjectDefinitionTagEntity) Test(org.junit.Test)

Example 8 with BusinessObjectDefinitionTag

use of org.finra.herd.model.api.xml.BusinessObjectDefinitionTag in project herd by FINRAOS.

the class BusinessObjectDefinitionTagServiceTest method testCreateBusinessObjectDefinitionTagLowerCaseParameters.

@Test
public void testCreateBusinessObjectDefinitionTagLowerCaseParameters() {
    // Create and persist a business object definition entity.
    businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), DATA_PROVIDER_NAME, DESCRIPTION);
    // Create and persist a tag entity.
    tagDaoTestHelper.createTagEntity(TAG_TYPE, TAG_CODE, TAG_DISPLAY_NAME, TAG_DESCRIPTION);
    // Create a business object definition tag using lower case parameter values.
    BusinessObjectDefinitionTag result = businessObjectDefinitionTagService.createBusinessObjectDefinitionTag(new BusinessObjectDefinitionTagCreateRequest(new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase()), new TagKey(TAG_TYPE.toLowerCase(), TAG_CODE.toLowerCase()))));
    // Validate the returned object.
    assertEquals(new BusinessObjectDefinitionTag(result.getId(), new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE))), result);
}
Also used : BusinessObjectDefinitionTag(org.finra.herd.model.api.xml.BusinessObjectDefinitionTag) BusinessObjectDefinitionKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) TagKey(org.finra.herd.model.api.xml.TagKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) BusinessObjectDefinitionTagCreateRequest(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagCreateRequest) Test(org.junit.Test)

Example 9 with BusinessObjectDefinitionTag

use of org.finra.herd.model.api.xml.BusinessObjectDefinitionTag in project herd by FINRAOS.

the class BusinessObjectDefinitionTagServiceTest method testDeleteBusinessObjectDefinitionTagUpperCaseParameters.

@Test
public void testDeleteBusinessObjectDefinitionTagUpperCaseParameters() {
    // Create a business object definition tag key.
    BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Create and persist a business object definition tag entity.
    BusinessObjectDefinitionTagEntity businessObjectDefinitionTagEntity = businessObjectDefinitionTagDaoTestHelper.createBusinessObjectDefinitionTagEntity(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Validate that this business object definition tag exists.
    assertNotNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
    // Delete this business object definition tag using upper case parameter values.
    BusinessObjectDefinitionTag result = businessObjectDefinitionTagService.deleteBusinessObjectDefinitionTag(new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase()), new TagKey(TAG_TYPE.toUpperCase(), TAG_CODE.toUpperCase())));
    // Validate the returned object.
    assertEquals(new BusinessObjectDefinitionTag(businessObjectDefinitionTagEntity.getId(), businessObjectDefinitionTagKey), result);
    // Ensure that this business object definition tag is no longer there.
    assertNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
}
Also used : BusinessObjectDefinitionTag(org.finra.herd.model.api.xml.BusinessObjectDefinitionTag) BusinessObjectDefinitionKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) TagKey(org.finra.herd.model.api.xml.TagKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) BusinessObjectDefinitionTagEntity(org.finra.herd.model.jpa.BusinessObjectDefinitionTagEntity) Test(org.junit.Test)

Example 10 with BusinessObjectDefinitionTag

use of org.finra.herd.model.api.xml.BusinessObjectDefinitionTag in project herd by FINRAOS.

the class BusinessObjectDefinitionTagServiceTest method testDeleteBusinessObjectDefinitionTagLowerCaseParameters.

@Test
public void testDeleteBusinessObjectDefinitionTagLowerCaseParameters() {
    // Create a business object definition tag key.
    BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Create and persist a business object definition tag entity.
    BusinessObjectDefinitionTagEntity businessObjectDefinitionTagEntity = businessObjectDefinitionTagDaoTestHelper.createBusinessObjectDefinitionTagEntity(new BusinessObjectDefinitionKey(BDEF_NAMESPACE, BDEF_NAME), new TagKey(TAG_TYPE, TAG_CODE));
    // Validate that this business object definition tag exists.
    assertNotNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
    // Delete this business object definition tag using lower case parameter values.
    BusinessObjectDefinitionTag result = businessObjectDefinitionTagService.deleteBusinessObjectDefinitionTag(new BusinessObjectDefinitionTagKey(new BusinessObjectDefinitionKey(BDEF_NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase()), new TagKey(TAG_TYPE.toLowerCase(), TAG_CODE.toLowerCase())));
    // Validate the returned object.
    assertEquals(new BusinessObjectDefinitionTag(businessObjectDefinitionTagEntity.getId(), businessObjectDefinitionTagKey), result);
    // Ensure that this business object definition tag is no longer there.
    assertNull(businessObjectDefinitionTagDao.getBusinessObjectDefinitionTagByKey(businessObjectDefinitionTagKey));
}
Also used : BusinessObjectDefinitionTag(org.finra.herd.model.api.xml.BusinessObjectDefinitionTag) BusinessObjectDefinitionKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) TagKey(org.finra.herd.model.api.xml.TagKey) BusinessObjectDefinitionTagKey(org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey) BusinessObjectDefinitionTagEntity(org.finra.herd.model.jpa.BusinessObjectDefinitionTagEntity) Test(org.junit.Test)

Aggregations

BusinessObjectDefinitionKey (org.finra.herd.model.api.xml.BusinessObjectDefinitionKey)10 BusinessObjectDefinitionTag (org.finra.herd.model.api.xml.BusinessObjectDefinitionTag)10 BusinessObjectDefinitionTagKey (org.finra.herd.model.api.xml.BusinessObjectDefinitionTagKey)10 TagKey (org.finra.herd.model.api.xml.TagKey)10 Test (org.junit.Test)10 BusinessObjectDefinitionTagCreateRequest (org.finra.herd.model.api.xml.BusinessObjectDefinitionTagCreateRequest)5 BusinessObjectDefinitionTagEntity (org.finra.herd.model.jpa.BusinessObjectDefinitionTagEntity)4