Package org.apache.maven.scm.provider
Class ScmProviderStub
java.lang.Object
org.apache.maven.scm.provider.ScmProviderStub
- All Implemented Interfaces:
ScmProvider
Stub implementation of ScmProvider for unit testing purposes.
It allows setting the expected results that the different methods will return.
More information about Stubs on
Martin Fowler's TestDouble
- Author:
- Carlos Sanchez
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new ScmProviderStub with bogus (not null) attributes -
Method Summary
Modifier and TypeMethodDescriptionadd
(ScmRepository repository, ScmFileSet fileSet) add
(ScmRepository repository, ScmFileSet fileSet, String message) add
(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters) blame
(BlameScmRequest blameScmRequest) blame
(ScmRepository repository, ScmFileSet fileSet, String filename) branch
(ScmRepository repository, ScmFileSet fileSet, String branchName) branch
(ScmRepository repository, ScmFileSet fileSet, String branchName, String message) branch
(ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters) changeLog
(ChangeLogScmRequest scmRequest) changeLog
(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag) changeLog
(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern) changeLog
(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch) changeLog
(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern) changeLog
(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch) changeLog
(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch, String datePattern) changeLog
(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) changeLog
(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern) checkIn
(ScmRepository repository, ScmFileSet fileSet, String message) checkIn
(ScmRepository repository, ScmFileSet fileSet, String tag, String message) checkIn
(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message) checkOut
(ScmRepository repository, ScmFileSet fileSet) checkOut
(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive) checkOut
(ScmRepository repository, ScmFileSet fileSet, String tag) checkOut
(ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive) checkOut
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) checkOut
(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive) checkOut
(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, CommandParameters commandParameters) diff
(ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision) diff
(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion) edit
(ScmRepository repository, ScmFileSet fileSet) export
(ScmRepository repository, ScmFileSet fileSet) export
(ScmRepository repository, ScmFileSet fileSet, String tag) export
(ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory) export
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) export
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory) info
(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) list
(ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag) list
(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version) makeProviderScmRepository
(String scmSpecificUrl, char delimiter) mkdir
(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) remoteInfo
(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) remove
(ScmRepository repository, ScmFileSet fileSet, String message) boolean
sanitizeTagName
(String tag) void
setAddScmResult
(AddScmResult addScmResult) void
setBlameScmResult
(BlameScmResult blameScmResult) void
setBranchScmResult
(BranchScmResult branchScmResult) void
setChangeLogScmResult
(ChangeLogScmResult changeLogScmResult) void
setCheckInScmResult
(CheckInScmResult checkInScmResult) void
setCheckOutScmResult
(CheckOutScmResult checkOutScmResult) void
setDiffScmResult
(DiffScmResult diffScmResult) void
setEditScmResult
(EditScmResult editScmResult) void
setExportScmResult
(ExportScmResult exportScmResult) void
setListScmResult
(ListScmResult listScmResult) void
setMkdirScmResult
(MkdirScmResult mkdirScmResult) void
setRemoveScmResult
(RemoveScmResult removeScmResult) void
setScmSpecificFilename
(String scmSpecificFilename) void
setStatusScmResult
(StatusScmResult statusScmResult) void
setTagScmResult
(TagScmResult tagScmResult) void
setUnEditScmResult
(UnEditScmResult unEditScmResult) void
setUntagScmResult
(UntagScmResult untagScmResult) void
setUpdateScmResult
(UpdateScmResult updateScmResult) status
(ScmRepository repository, ScmFileSet fileSet) tag
(ScmRepository repository, ScmFileSet fileSet, String tag) tag
(ScmRepository repository, ScmFileSet fileSet, String tag, String message) tag
(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters) unedit
(ScmRepository repository, ScmFileSet fileSet) untag
(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) update
(ScmRepository repository, ScmFileSet fileSet) update
(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog) update
(ScmRepository repository, ScmFileSet fileSet, String tag) update
(ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog) update
(ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern) update
(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate) update
(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern) update
(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern, boolean runChangelog) update
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) update
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog) update
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern) update
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate) update
(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern) validateScmUrl
(String scmSpecificUrl, char delimiter) boolean
validateTagName
(String tag) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.scm.provider.ScmProvider
setInteractive
-
Constructor Details
-
ScmProviderStub
public ScmProviderStub()Create a new ScmProviderStub with bogus (not null) attributes
-
-
Method Details
-
sanitizeTagName
- Specified by:
sanitizeTagName
in interfaceScmProvider
-
validateTagName
- Specified by:
validateTagName
in interfaceScmProvider
-
getScmType
- Specified by:
getScmType
in interfaceScmProvider
-
setScmSpecificFilename
-
requiresEditMode
- Specified by:
requiresEditMode
in interfaceScmProvider
-
setAddScmResult
-
getAddScmResult
-
setBranchScmResult
-
getBranchScmResult
-
setCheckInScmResult
-
getCheckInScmResult
-
setCheckOutScmResult
-
getCheckOutScmResult
-
setChangeLogScmResult
-
getChangeLogScmResult
-
setDiffScmResult
-
getDiffScmResult
-
getExportScmResult
-
setExportScmResult
-
setTagScmResult
-
getTagScmResult
-
setUntagScmResult
-
getUntagScmResult
-
setRemoveScmResult
-
getRemoveScmResult
-
setStatusScmResult
-
getStatusScmResult
-
setUpdateScmResult
-
getUpdateScmResult
-
setEditScmResult
-
getEditScmResult
-
setUnEditScmResult
-
getUnEditScmResult
-
setListScmResult
-
getListScmResult
-
setBlameScmResult
-
getBlameScmResult
-
getMkdirScmResult
-
setMkdirScmResult
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException - Specified by:
makeProviderScmRepository
in interfaceScmProvider
- Throws:
ScmRepositoryException
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(File path) throws ScmRepositoryException, UnknownRepositoryStructure - Specified by:
makeProviderScmRepository
in interfaceScmProvider
- Throws:
ScmRepositoryException
UnknownRepositoryStructure
-
validateScmUrl
- Specified by:
validateScmUrl
in interfaceScmProvider
-
getScmSpecificFilename
- Specified by:
getScmSpecificFilename
in interfaceScmProvider
-
add
- Specified by:
add
in interfaceScmProvider
- Throws:
ScmException
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException - Specified by:
add
in interfaceScmProvider
- Throws:
ScmException
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters) throws ScmException - Specified by:
add
in interfaceScmProvider
- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException - Specified by:
branch
in interfaceScmProvider
- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message) throws ScmException - Specified by:
branch
in interfaceScmProvider
- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters) throws ScmException - Specified by:
branch
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch, String datePattern) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
- Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern) throws ScmException - Specified by:
changeLog
in interfaceScmProvider
- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException - Specified by:
checkIn
in interfaceScmProvider
- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException - Specified by:
checkIn
in interfaceScmProvider
- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message) throws ScmException - Specified by:
checkIn
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
- Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, CommandParameters commandParameters) throws ScmException - Specified by:
checkOut
in interfaceScmProvider
- Throws:
ScmException
-
diff
public DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision) throws ScmException - Specified by:
diff
in interfaceScmProvider
- Throws:
ScmException
-
diff
public DiffScmResult diff(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException - Specified by:
diff
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern, boolean runChangelog) throws ScmException - Returns:
- getUpdateScmResult() always
- Throws:
ScmException
-
edit
- Specified by:
edit
in interfaceScmProvider
- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException - Specified by:
export
in interfaceScmProvider
- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory) throws ScmException - Specified by:
export
in interfaceScmProvider
- Throws:
ScmException
-
export
- Specified by:
export
in interfaceScmProvider
- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException - Specified by:
export
in interfaceScmProvider
- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory) throws ScmException - Specified by:
export
in interfaceScmProvider
- Throws:
ScmException
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag) throws ScmException - Specified by:
list
in interfaceScmProvider
- Throws:
ScmException
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version) throws ScmException - Specified by:
list
in interfaceScmProvider
- Throws:
ScmException
-
remove
public RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException - Specified by:
remove
in interfaceScmProvider
- Throws:
ScmException
-
status
- Specified by:
status
in interfaceScmProvider
- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException - Specified by:
tag
in interfaceScmProvider
- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException - Specified by:
tag
in interfaceScmProvider
- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters) throws ScmException - Specified by:
tag
in interfaceScmProvider
- Throws:
ScmException
-
untag
public UntagScmResult untag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Specified by:
untag
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
- Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern) throws ScmException - Specified by:
update
in interfaceScmProvider
- Throws:
ScmException
-
unedit
- Specified by:
unedit
in interfaceScmProvider
- Throws:
ScmException
-
blame
public BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException - Specified by:
blame
in interfaceScmProvider
- Throws:
ScmException
-
blame
- Specified by:
blame
in interfaceScmProvider
- Throws:
ScmException
-
mkdir
public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) throws ScmException - Specified by:
mkdir
in interfaceScmProvider
- Throws:
ScmException
-
info
public InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Specified by:
info
in interfaceScmProvider
- Throws:
ScmException
-
remoteInfo
public RemoteInfoScmResult remoteInfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException - Specified by:
remoteInfo
in interfaceScmProvider
- Throws:
ScmException
-