org.kuali.student.lum.program.service.impl
Class TestProgramServiceImpl
java.lang.Object
org.kuali.student.lum.program.service.impl.TestProgramServiceImpl
@ContextConfiguration(locations="classpath:program-test-context.xml")
public class TestProgramServiceImpl
- extends Object
Method Summary |
private static void |
checkLo(LoInfo li1,
LoInfo li2)
|
private static void |
checkLoCategory(LoCategoryInfo loCategoryInfo,
LoCategoryInfo loCategoryInfo2)
|
private static void |
checkLoCategorys(List<LoCategoryInfo> loCategoryInfoList,
List<LoCategoryInfo> loCategoryInfoList2)
|
private static void |
checkLoDisplay(LoDisplayInfo ldi1,
LoDisplayInfo ldi2)
|
private static void |
checkLoDisplayLists(List<LoDisplayInfo> di1,
List<LoDisplayInfo> di2)
|
private static void |
checkLoDisplays(List<LoDisplayInfo> los,
List<LoDisplayInfo> los2)
|
private static void |
checkProgramRequirement(ProgramRequirementInfo orig,
ProgramRequirementInfo created)
|
private static void |
checkReqCompField(ReqCompFieldInfo reqCompField,
ReqCompFieldInfo reqCompField2)
|
private static void |
checkReqCompFields(List<ReqCompFieldInfo> reqCompFields,
List<ReqCompFieldInfo> reqCompFields2)
|
private static void |
checkReqCompFieldType(ReqCompFieldTypeInfo reqCompFieldTypeInfo,
ReqCompFieldTypeInfo reqCompFieldTypeInfo2)
|
private static void |
checkReqCompFieldTypes(List<ReqCompFieldTypeInfo> reqCompFieldTypeInfos,
List<ReqCompFieldTypeInfo> reqCompFieldTypeInfos2)
|
private static void |
checkReqComponent(ReqComponentInfo reqComponent,
ReqComponentInfo reqComponent2)
|
private static void |
checkReqComponents(List<ReqComponentInfo> reqComponents,
List<ReqComponentInfo> reqComponents2)
|
private static void |
checkReqComponentType(ReqComponentTypeInfo requiredComponentType,
ReqComponentTypeInfo requiredComponentType2)
|
private static void |
checkRichText(RichTextInfo desc,
RichTextInfo desc2)
|
private static void |
checkStatementTreeView(StatementTreeViewInfo statement,
StatementTreeViewInfo statement2)
|
private static void |
checkStatementTreeViews(List<StatementTreeViewInfo> statements,
List<StatementTreeViewInfo> statements2)
|
private void |
checkTreeView(ProgramRequirementInfo progReqInfo,
boolean checkNaturalLanguage)
|
private ProgramRequirementInfo |
createProgramRequirementTestData()
|
private static StatementTreeViewInfo |
createStatementTree()
|
private void |
fixLoCategoryId(List<LoCategoryInfo> loCategoryInfoList)
|
private void |
fixLoCategoryIds(List<LoDisplayInfo> loDisplayInfoList)
|
private void |
invokeForExpectedException(Collection<TestProgramServiceImpl.ServiceMethodInvocationData> methods,
Class<? extends Exception> expectedExceptionClass)
|
void |
testCallDummyMethods()
This method is a catch-all test for code coverage. |
void |
testCoreProgramVersioning()
|
void |
testCreateBaccCredentialProgram()
|
void |
testCreateCoreProgram()
|
void |
testCreateMajorDiscipline()
|
void |
testCreateMajorDisciplineDeleteRule()
|
void |
testCreateProgramRequirement_null()
|
void |
testCreateProgramRequirement()
|
void |
testCreateVariationsByMajorDiscipline()
|
void |
testCreditsProgramRequirement()
|
void |
testDeleteBaccCredentialProgram()
|
void |
testDeleteCoreProgram()
|
void |
testDeleteMajorDiscipline()
|
void |
testDeleteProgramRequirement()
|
void |
testDeleteVariationsByMajorDiscipline()
|
void |
testGetBaccCredentialProgram()
|
void |
testGetCoreProgram()
|
void |
testGetMajorDiscipline()
|
void |
testGetMetaData()
|
void |
testGetProgramRequirement_badId()
|
void |
testGetProgramRequirement_nullId()
|
void |
testGetProgramRequirement()
|
void |
testGetProgramRequirementNL()
|
void |
testGetVariationsByMajorDisciplineId()
|
void |
testGetVersionMethodsForInvalidParameters()
|
void |
testMajorDisciplineVersioning()
|
void |
testProgramServiceSetup()
|
void |
testUpdateBaccCredentialProgram()
|
void |
testUpdateCoreProgram()
|
void |
testUpdateMajorDiscipline()
|
void |
testUpdateMajorDisciplineRemoveRule()
|
void |
testUpdateProgramRequirement()
|
void |
testUpdateVariationsByMajorDiscipline()
|
private static RichTextInfo |
toRichText(String text)
|
private void |
verifyUpdate(CoreProgramInfo updatedCP)
|
private void |
verifyUpdate(CredentialProgramInfo updatedCP)
|
private void |
verifyUpdate(MajorDisciplineInfo updatedMD)
|
private void |
verifyUpdate(ProgramVariationInfo source,
ProgramVariationInfo target)
|
private void |
verifyUpdatedPVinList(ProgramVariationInfo pvInfo,
List<ProgramVariationInfo> updatedPvInfos)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
programService
public ProgramService programService
statementService
public StatementService statementService
OTHER_LO_CAT_ID
private static final String OTHER_LO_CAT_ID
- See Also:
- Constant Field Values
DUMMY_SERVICE_METHODS
private final String[] DUMMY_SERVICE_METHODS
- A set of methods that have a dummy implementation in ProgramServiceImpl. Method names should be removed from here once
they have a working implementation.
TestProgramServiceImpl
public TestProgramServiceImpl()
testProgramServiceSetup
public void testProgramServiceSetup()
testGetMetaData
public void testGetMetaData()
testGetProgramRequirement
public void testGetProgramRequirement()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testGetProgramRequirementNL
public void testGetProgramRequirementNL()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
checkTreeView
private void checkTreeView(ProgramRequirementInfo progReqInfo,
boolean checkNaturalLanguage)
testGetProgramRequirement_nullId
public void testGetProgramRequirement_nullId()
throws Exception
- Throws:
Exception
testGetProgramRequirement_badId
public void testGetProgramRequirement_badId()
throws Exception
- Throws:
Exception
testGetCoreProgram
public void testGetCoreProgram()
throws InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DoesNotExistException
- Throws:
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DoesNotExistException
testGetMajorDiscipline
public void testGetMajorDiscipline()
throws InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DoesNotExistException
- Throws:
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DoesNotExistException
testGetVariationsByMajorDisciplineId
public void testGetVariationsByMajorDisciplineId()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testGetBaccCredentialProgram
public void testGetBaccCredentialProgram()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testCreateMajorDiscipline
public void testCreateMajorDiscipline()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testMajorDisciplineVersioning
public void testMajorDisciplineVersioning()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
VersionMismatchException,
DoesNotExistException,
CircularRelationshipException,
DependentObjectsExistException,
UnsupportedActionException,
IllegalVersionSequencingException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
VersionMismatchException
DoesNotExistException
CircularRelationshipException
DependentObjectsExistException
UnsupportedActionException
IllegalVersionSequencingException
testCreateMajorDisciplineDeleteRule
public void testCreateMajorDisciplineDeleteRule()
throws AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException
- Throws:
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
testCreateProgramRequirement_null
public void testCreateProgramRequirement_null()
throws Exception
- Throws:
Exception
testCreateProgramRequirement
public void testCreateProgramRequirement()
throws AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DoesNotExistException
- Throws:
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DoesNotExistException
createProgramRequirementTestData
private ProgramRequirementInfo createProgramRequirementTestData()
checkProgramRequirement
private static void checkProgramRequirement(ProgramRequirementInfo orig,
ProgramRequirementInfo created)
checkStatementTreeView
private static void checkStatementTreeView(StatementTreeViewInfo statement,
StatementTreeViewInfo statement2)
checkReqComponents
private static void checkReqComponents(List<ReqComponentInfo> reqComponents,
List<ReqComponentInfo> reqComponents2)
checkReqComponent
private static void checkReqComponent(ReqComponentInfo reqComponent,
ReqComponentInfo reqComponent2)
checkReqComponentType
private static void checkReqComponentType(ReqComponentTypeInfo requiredComponentType,
ReqComponentTypeInfo requiredComponentType2)
checkReqCompFieldTypes
private static void checkReqCompFieldTypes(List<ReqCompFieldTypeInfo> reqCompFieldTypeInfos,
List<ReqCompFieldTypeInfo> reqCompFieldTypeInfos2)
checkReqCompFieldType
private static void checkReqCompFieldType(ReqCompFieldTypeInfo reqCompFieldTypeInfo,
ReqCompFieldTypeInfo reqCompFieldTypeInfo2)
checkReqCompFields
private static void checkReqCompFields(List<ReqCompFieldInfo> reqCompFields,
List<ReqCompFieldInfo> reqCompFields2)
checkReqCompField
private static void checkReqCompField(ReqCompFieldInfo reqCompField,
ReqCompFieldInfo reqCompField2)
checkStatementTreeViews
private static void checkStatementTreeViews(List<StatementTreeViewInfo> statements,
List<StatementTreeViewInfo> statements2)
checkLoDisplays
private static void checkLoDisplays(List<LoDisplayInfo> los,
List<LoDisplayInfo> los2)
checkLoDisplay
private static void checkLoDisplay(LoDisplayInfo ldi1,
LoDisplayInfo ldi2)
checkLoCategorys
private static void checkLoCategorys(List<LoCategoryInfo> loCategoryInfoList,
List<LoCategoryInfo> loCategoryInfoList2)
checkLoCategory
private static void checkLoCategory(LoCategoryInfo loCategoryInfo,
LoCategoryInfo loCategoryInfo2)
checkLoDisplayLists
private static void checkLoDisplayLists(List<LoDisplayInfo> di1,
List<LoDisplayInfo> di2)
checkLo
private static void checkLo(LoInfo li1,
LoInfo li2)
checkRichText
private static void checkRichText(RichTextInfo desc,
RichTextInfo desc2)
createStatementTree
private static StatementTreeViewInfo createStatementTree()
toRichText
private static RichTextInfo toRichText(String text)
testUpdateProgramRequirement
public void testUpdateProgramRequirement()
throws Exception
- Throws:
Exception
testDeleteMajorDiscipline
public void testDeleteMajorDiscipline()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
AlreadyExistsException,
DataValidationErrorException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
AlreadyExistsException
DataValidationErrorException
fixLoCategoryIds
private void fixLoCategoryIds(List<LoDisplayInfo> loDisplayInfoList)
fixLoCategoryId
private void fixLoCategoryId(List<LoCategoryInfo> loCategoryInfoList)
testUpdateMajorDiscipline
public void testUpdateMajorDiscipline()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
DataValidationErrorException,
DoesNotExistException,
InvalidParameterException,
MissingParameterException,
VersionMismatchException,
OperationFailedException,
PermissionDeniedException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
DataValidationErrorException
DoesNotExistException
InvalidParameterException
MissingParameterException
VersionMismatchException
OperationFailedException
PermissionDeniedException
testUpdateMajorDisciplineRemoveRule
public void testUpdateMajorDisciplineRemoveRule()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DoesNotExistException,
VersionMismatchException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DoesNotExistException
VersionMismatchException
verifyUpdate
private void verifyUpdate(MajorDisciplineInfo updatedMD)
testCreateBaccCredentialProgram
public void testCreateBaccCredentialProgram()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testDeleteBaccCredentialProgram
public void testDeleteBaccCredentialProgram()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
PermissionDeniedException,
OperationFailedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
PermissionDeniedException
OperationFailedException
testUpdateBaccCredentialProgram
public void testUpdateBaccCredentialProgram()
throws DataValidationErrorException,
DoesNotExistException,
InvalidParameterException,
MissingParameterException,
VersionMismatchException,
OperationFailedException,
PermissionDeniedException
- Throws:
DataValidationErrorException
DoesNotExistException
InvalidParameterException
MissingParameterException
VersionMismatchException
OperationFailedException
PermissionDeniedException
verifyUpdate
private void verifyUpdate(CredentialProgramInfo updatedCP)
testCreateCoreProgram
public void testCreateCoreProgram()
throws IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException
- Throws:
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
testUpdateVariationsByMajorDiscipline
public void testUpdateVariationsByMajorDiscipline()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DataValidationErrorException,
VersionMismatchException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DataValidationErrorException
VersionMismatchException
verifyUpdatedPVinList
private void verifyUpdatedPVinList(ProgramVariationInfo pvInfo,
List<ProgramVariationInfo> updatedPvInfos)
verifyUpdate
private void verifyUpdate(ProgramVariationInfo source,
ProgramVariationInfo target)
testCreateVariationsByMajorDiscipline
public void testCreateVariationsByMajorDiscipline()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
DataValidationErrorException,
VersionMismatchException,
PermissionDeniedException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
DataValidationErrorException
VersionMismatchException
PermissionDeniedException
testDeleteVariationsByMajorDiscipline
public void testDeleteVariationsByMajorDiscipline()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DataValidationErrorException,
VersionMismatchException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DataValidationErrorException
VersionMismatchException
testDeleteProgramRequirement
public void testDeleteProgramRequirement()
throws Exception
- Throws:
Exception
testUpdateCoreProgram
public void testUpdateCoreProgram()
throws DoesNotExistException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DataValidationErrorException,
VersionMismatchException
- Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DataValidationErrorException
VersionMismatchException
verifyUpdate
private void verifyUpdate(CoreProgramInfo updatedCP)
testDeleteCoreProgram
public void testDeleteCoreProgram()
throws AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
IllegalArgumentException,
SecurityException,
IntrospectionException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException,
DoesNotExistException
- Throws:
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
IllegalArgumentException
SecurityException
IntrospectionException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchFieldException
DoesNotExistException
testCreditsProgramRequirement
public void testCreditsProgramRequirement()
throws AlreadyExistsException,
DataValidationErrorException,
InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException,
DoesNotExistException
- Throws:
AlreadyExistsException
DataValidationErrorException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DoesNotExistException
invokeForExpectedException
private void invokeForExpectedException(Collection<TestProgramServiceImpl.ServiceMethodInvocationData> methods,
Class<? extends Exception> expectedExceptionClass)
throws Exception
- Throws:
Exception
testGetVersionMethodsForInvalidParameters
public void testGetVersionMethodsForInvalidParameters()
throws Exception
- Throws:
Exception
testCallDummyMethods
public void testCallDummyMethods()
throws Exception
- This method is a catch-all test for code coverage.
It calls methods in ProgramServiceImpl that have contracts in the interface but are not yet implemented
All calls are expected to return null. Once a method is implemented, its name should be removed from
the DUMMY_SERVICE_METHODS array.
NOTE: This method does not work for methods that are overloaded (i.e. have two declarations with the same name, but different parameters)
- Throws:
Exception
testCoreProgramVersioning
public void testCoreProgramVersioning()
throws Exception
- Throws:
Exception
Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.