use of org.finra.herd.model.api.xml.BusinessObjectDefinitionSubjectMatterExpert in project herd by FINRAOS.
the class BusinessObjectDefinitionSubjectMatterExpertServiceTest method testCreateBusinessObjectDefinitionSubjectMatterExpertTrimParameters.
@Test
public void testCreateBusinessObjectDefinitionSubjectMatterExpertTrimParameters() {
// Create and persist the relative database entities.
businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, DESCRIPTION);
// Create a business object definition subject matter expert using input parameters with leading and trailing empty spaces.
BusinessObjectDefinitionSubjectMatterExpert resultBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertService.createBusinessObjectDefinitionSubjectMatterExpert(new BusinessObjectDefinitionSubjectMatterExpertCreateRequest(new BusinessObjectDefinitionSubjectMatterExpertKey(addWhitespace(BDEF_NAMESPACE), addWhitespace(BDEF_NAME.toUpperCase()), addWhitespace(USER_ID))));
// Validate the returned object.
assertEquals(new BusinessObjectDefinitionSubjectMatterExpert(resultBusinessObjectDefinitionSubjectMatterExpert.getId(), new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID)), resultBusinessObjectDefinitionSubjectMatterExpert);
}
use of org.finra.herd.model.api.xml.BusinessObjectDefinitionSubjectMatterExpert in project herd by FINRAOS.
the class BusinessObjectDefinitionSubjectMatterExpertServiceTest method testDeleteBusinessObjectDefinitionSubjectMatterExpertUpperCaseParameters.
@Test
public void testDeleteBusinessObjectDefinitionSubjectMatterExpertUpperCaseParameters() {
// Create a business object definition subject matter expert key.
BusinessObjectDefinitionSubjectMatterExpertKey key = new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID);
// Create and persist a business object definition subject matter expert.
BusinessObjectDefinitionSubjectMatterExpertEntity businessObjectDefinitionSubjectMatterExpertEntity = businessObjectDefinitionSubjectMatterExpertDaoTestHelper.createBusinessObjectDefinitionSubjectMatterExpertEntity(key);
// Validate that this business object definition subject matter expert exists.
assertNotNull(businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpertByKey(key));
// Delete this business object definition subject matter expert using upper case parameter values.
BusinessObjectDefinitionSubjectMatterExpert deletedBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertService.deleteBusinessObjectDefinitionSubjectMatterExpert(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), USER_ID.toUpperCase()));
// Validate the returned object.
assertEquals(new BusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionSubjectMatterExpertEntity.getId(), key), deletedBusinessObjectDefinitionSubjectMatterExpert);
// Ensure that this business object definition subject matter expert is no longer there.
assertNull(businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpertByKey(key));
}
use of org.finra.herd.model.api.xml.BusinessObjectDefinitionSubjectMatterExpert in project herd by FINRAOS.
the class BusinessObjectDefinitionSubjectMatterExpertServiceTest method testDeleteBusinessObjectDefinitionSubjectMatterExpertLowerCaseParameters.
@Test
public void testDeleteBusinessObjectDefinitionSubjectMatterExpertLowerCaseParameters() {
// Create a business object definition subject matter expert key.
BusinessObjectDefinitionSubjectMatterExpertKey key = new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID);
// Create and persist a business object definition subject matter expert.
BusinessObjectDefinitionSubjectMatterExpertEntity businessObjectDefinitionSubjectMatterExpertEntity = businessObjectDefinitionSubjectMatterExpertDaoTestHelper.createBusinessObjectDefinitionSubjectMatterExpertEntity(key);
// Validate that this business object definition subject matter expert exists.
assertNotNull(businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpertByKey(key));
// Delete this business object definition subject matter expert using lower case parameter values.
BusinessObjectDefinitionSubjectMatterExpert deletedBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertService.deleteBusinessObjectDefinitionSubjectMatterExpert(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), USER_ID.toLowerCase()));
// Validate the returned object.
assertEquals(new BusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionSubjectMatterExpertEntity.getId(), key), deletedBusinessObjectDefinitionSubjectMatterExpert);
// Ensure that this business object definition subject matter expert is no longer there.
assertNull(businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpertByKey(key));
}
use of org.finra.herd.model.api.xml.BusinessObjectDefinitionSubjectMatterExpert in project herd by FINRAOS.
the class BusinessObjectDefinitionSubjectMatterExpertServiceTest method testCreateBusinessObjectDefinitionSubjectMatterExpertUpperCaseParameters.
@Test
public void testCreateBusinessObjectDefinitionSubjectMatterExpertUpperCaseParameters() {
// Create and persist the relative database entities.
businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, DESCRIPTION);
// Create a business object definition subject matter expert using upper case parameter values.
BusinessObjectDefinitionSubjectMatterExpert resultBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertService.createBusinessObjectDefinitionSubjectMatterExpert(new BusinessObjectDefinitionSubjectMatterExpertCreateRequest(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE.toUpperCase(), BDEF_NAME.toUpperCase(), USER_ID.toUpperCase())));
// Validate the returned object.
assertEquals(new BusinessObjectDefinitionSubjectMatterExpert(resultBusinessObjectDefinitionSubjectMatterExpert.getId(), new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID.toUpperCase())), resultBusinessObjectDefinitionSubjectMatterExpert);
}
use of org.finra.herd.model.api.xml.BusinessObjectDefinitionSubjectMatterExpert in project herd by FINRAOS.
the class BusinessObjectDefinitionSubjectMatterExpertServiceTest method testCreateBusinessObjectDefinitionSubjectMatterExpertLowerCaseParameters.
@Test
public void testCreateBusinessObjectDefinitionSubjectMatterExpertLowerCaseParameters() {
// Create and persist the relative database entities.
businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, DESCRIPTION);
// Create a business object definition subject matter expert using lower case parameter values.
BusinessObjectDefinitionSubjectMatterExpert resultBusinessObjectDefinitionSubjectMatterExpert = businessObjectDefinitionSubjectMatterExpertService.createBusinessObjectDefinitionSubjectMatterExpert(new BusinessObjectDefinitionSubjectMatterExpertCreateRequest(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE.toLowerCase(), BDEF_NAME.toLowerCase(), USER_ID.toLowerCase())));
// Validate the returned object.
assertEquals(new BusinessObjectDefinitionSubjectMatterExpert(resultBusinessObjectDefinitionSubjectMatterExpert.getId(), new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID.toLowerCase())), resultBusinessObjectDefinitionSubjectMatterExpert);
}
Aggregations