com.silverpeas.pdc.web.mock
Class PdcClassificationServiceMockWrapper
java.lang.Object
com.silverpeas.pdc.web.mock.PdcClassificationServiceMockWrapper
- All Implemented Interfaces:
- PdcClassificationService
@Named(value="pdcClassificationService")
public class PdcClassificationServiceMockWrapper
- extends Object
- implements PdcClassificationService
It plays the role of a PdcClassificationService instance for the unit tests. It wraps a mock of
the true PdcClassificationService class used by the business objects and it delegates to it all
the invoked methods. The wrapped mock can be get to register some behaviour expected by the
tests. Default behaviours are registered by taking into account the business logic of the
original methods. Thoses are savePreDefinedClassification, getPreDefinedClassification, and
findAPreDefinedClassification: the classification getter returns NONE_CLASSIFICATION and the
saver sets the unique identifier of the classification and sets the behaviour of the getter to
return it when asked.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PdcClassificationServiceMockWrapper
public PdcClassificationServiceMockWrapper()
getPdcClassificationServiceMock
public PdcClassificationService getPdcClassificationServiceMock()
withClassification
public static PdcClassification withClassification(PdcClassification classification)
savePreDefinedClassification
public PdcClassification savePreDefinedClassification(PdcClassification classification)
- Specified by:
savePreDefinedClassification in interface PdcClassificationService
getPreDefinedClassification
public PdcClassification getPreDefinedClassification(String instanceId)
- Specified by:
getPreDefinedClassification in interface PdcClassificationService
getPreDefinedClassification
public PdcClassification getPreDefinedClassification(String nodeId,
String instanceId)
- Specified by:
getPreDefinedClassification in interface PdcClassificationService
findAPreDefinedClassification
public PdcClassification findAPreDefinedClassification(String nodeId,
String instanceId)
- Specified by:
findAPreDefinedClassification in interface PdcClassificationService
deletePreDefinedClassification
public void deletePreDefinedClassification(String nodeId,
String instanceId)
- Specified by:
deletePreDefinedClassification in interface PdcClassificationService
classifyContent
public void classifyContent(SilverpeasContent content,
PdcClassification withClassification)
throws PdcRuntimeException
- Specified by:
classifyContent in interface PdcClassificationService
- Throws:
PdcRuntimeException
axisValuesDeleted
public void axisValuesDeleted(List<PdcAxisValue> deletedValues)
- Specified by:
axisValuesDeleted in interface PdcClassificationService
axisDeleted
public void axisDeleted(String axisId)
- Specified by:
axisDeleted in interface PdcClassificationService
classifyContent
public void classifyContent(SilverpeasContent content,
PdcClassification withClassification,
boolean alertSubscribers)
throws PdcRuntimeException
- Specified by:
classifyContent in interface PdcClassificationService
- Throws:
PdcRuntimeException
Copyright © 2016 Silverpeas. All Rights Reserved.