Package org.apache.maven.scm.provider
Class ScmProviderStub
- java.lang.Object
-
- org.apache.maven.scm.provider.ScmProviderStub
-
- All Implemented Interfaces:
ScmProvider
public class ScmProviderStub extends Object implements 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
Constructors Constructor Description ScmProviderStub()Create a new ScmProviderStub with bogus (not null) attributes.
-
Method Summary
-
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 Detail
-
ScmProviderStub
public ScmProviderStub()
Create a new ScmProviderStub with bogus (not null) attributes.
-
-
Method Detail
-
sanitizeTagName
public String sanitizeTagName(String tag)
- Specified by:
sanitizeTagNamein interfaceScmProvider
-
validateTagName
public boolean validateTagName(String tag)
- Specified by:
validateTagNamein interfaceScmProvider
-
getScmType
public String getScmType()
- Specified by:
getScmTypein interfaceScmProvider
-
setScmSpecificFilename
public void setScmSpecificFilename(String scmSpecificFilename)
-
requiresEditMode
public boolean requiresEditMode()
- Specified by:
requiresEditModein interfaceScmProvider
-
setAddScmResult
public void setAddScmResult(AddScmResult addScmResult)
-
getAddScmResult
public AddScmResult getAddScmResult()
-
setBranchScmResult
public void setBranchScmResult(BranchScmResult branchScmResult)
-
getBranchScmResult
public BranchScmResult getBranchScmResult()
-
setCheckInScmResult
public void setCheckInScmResult(CheckInScmResult checkInScmResult)
-
getCheckInScmResult
public CheckInScmResult getCheckInScmResult()
-
setCheckOutScmResult
public void setCheckOutScmResult(CheckOutScmResult checkOutScmResult)
-
getCheckOutScmResult
public CheckOutScmResult getCheckOutScmResult()
-
setChangeLogScmResult
public void setChangeLogScmResult(ChangeLogScmResult changeLogScmResult)
-
getChangeLogScmResult
public ChangeLogScmResult getChangeLogScmResult()
-
setDiffScmResult
public void setDiffScmResult(DiffScmResult diffScmResult)
-
getDiffScmResult
public DiffScmResult getDiffScmResult()
-
getExportScmResult
public ExportScmResult getExportScmResult()
-
setExportScmResult
public void setExportScmResult(ExportScmResult exportScmResult)
-
setTagScmResult
public void setTagScmResult(TagScmResult tagScmResult)
-
getTagScmResult
public TagScmResult getTagScmResult()
-
setUntagScmResult
public void setUntagScmResult(UntagScmResult untagScmResult)
-
getUntagScmResult
public UntagScmResult getUntagScmResult()
-
setRemoveScmResult
public void setRemoveScmResult(RemoveScmResult removeScmResult)
-
getRemoveScmResult
public RemoveScmResult getRemoveScmResult()
-
setStatusScmResult
public void setStatusScmResult(StatusScmResult statusScmResult)
-
getStatusScmResult
public StatusScmResult getStatusScmResult()
-
setUpdateScmResult
public void setUpdateScmResult(UpdateScmResult updateScmResult)
-
getUpdateScmResult
public UpdateScmResult getUpdateScmResult()
-
setEditScmResult
public void setEditScmResult(EditScmResult editScmResult)
-
getEditScmResult
public EditScmResult getEditScmResult()
-
setUnEditScmResult
public void setUnEditScmResult(UnEditScmResult unEditScmResult)
-
getUnEditScmResult
public UnEditScmResult getUnEditScmResult()
-
setListScmResult
public void setListScmResult(ListScmResult listScmResult)
-
getListScmResult
public ListScmResult getListScmResult()
-
setBlameScmResult
public void setBlameScmResult(BlameScmResult blameScmResult)
-
getBlameScmResult
public BlameScmResult getBlameScmResult()
-
getMkdirScmResult
public MkdirScmResult getMkdirScmResult()
-
setMkdirScmResult
public void setMkdirScmResult(MkdirScmResult mkdirScmResult)
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(String scmSpecificUrl, char delimiter) throws ScmRepositoryException
- Specified by:
makeProviderScmRepositoryin interfaceScmProvider- Throws:
ScmRepositoryException
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(File path) throws ScmRepositoryException, UnknownRepositoryStructure
- Specified by:
makeProviderScmRepositoryin interfaceScmProvider- Throws:
ScmRepositoryExceptionUnknownRepositoryStructure
-
validateScmUrl
public List<String> validateScmUrl(String scmSpecificUrl, char delimiter)
- Specified by:
validateScmUrlin interfaceScmProvider
-
getScmSpecificFilename
public String getScmSpecificFilename()
- Specified by:
getScmSpecificFilenamein interfaceScmProvider
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
addin interfaceScmProvider- Throws:
ScmException
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
- Specified by:
addin interfaceScmProvider- Throws:
ScmException
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters) throws ScmException
- Specified by:
addin interfaceScmProvider- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException
- Specified by:
branchin interfaceScmProvider- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message) throws ScmException
- Specified by:
branchin interfaceScmProvider- Throws:
ScmException
-
branch
public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters) throws ScmException
- Specified by:
branchin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch) throws ScmException
- Specified by:
changeLogin 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:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag) throws ScmException
- Specified by:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern) throws ScmException
- Specified by:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch) throws ScmException
- Specified by:
changeLogin 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:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ChangeLogScmRequest scmRequest) throws ScmException
- Specified by:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException
- Specified by:
changeLogin interfaceScmProvider- Throws:
ScmException
-
changeLog
public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision, String datePattern) throws ScmException
- Specified by:
changeLogin interfaceScmProvider- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException
- Specified by:
checkInin interfaceScmProvider- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
- Specified by:
checkInin interfaceScmProvider- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message) throws ScmException
- Specified by:
checkInin interfaceScmProvider- Throws:
ScmException
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
checkInin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
checkOut
public CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, CommandParameters commandParameters) throws ScmException
- Specified by:
checkOutin interfaceScmProvider- Throws:
ScmException
-
diff
public DiffScmResult diff(ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision) throws ScmException
- Specified by:
diffin interfaceScmProvider- Throws:
ScmException
-
diff
public DiffScmResult diff(ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion) throws ScmException
- Specified by:
diffin 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
public EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
editin interfaceScmProvider- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
- Specified by:
exportin interfaceScmProvider- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory) throws ScmException
- Specified by:
exportin interfaceScmProvider- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
exportin interfaceScmProvider- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
- Specified by:
exportin interfaceScmProvider- Throws:
ScmException
-
export
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory) throws ScmException
- Specified by:
exportin interfaceScmProvider- Throws:
ScmException
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag) throws ScmException
- Specified by:
listin interfaceScmProvider- Throws:
ScmException
-
list
public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version) throws ScmException
- Specified by:
listin interfaceScmProvider- Throws:
ScmException
-
remove
public RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException
- Specified by:
removein interfaceScmProvider- Throws:
ScmException
-
status
public StatusScmResult status(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
statusin interfaceScmProvider- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
- Specified by:
tagin interfaceScmProvider- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tag, String message) throws ScmException
- Specified by:
tagin interfaceScmProvider- Throws:
ScmException
-
tag
public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters) throws ScmException
- Specified by:
tagin interfaceScmProvider- Throws:
ScmException
-
untag
public UntagScmResult untag(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
untagin interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
update
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern) throws ScmException
- Specified by:
updatein interfaceScmProvider- Throws:
ScmException
-
unedit
public UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- Specified by:
uneditin interfaceScmProvider- Throws:
ScmException
-
blame
public BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException
- Specified by:
blamein interfaceScmProvider- Throws:
ScmException
-
blame
public BlameScmResult blame(BlameScmRequest blameScmRequest) throws ScmException
- Specified by:
blamein interfaceScmProvider- Throws:
ScmException
-
mkdir
public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal) throws ScmException
- Specified by:
mkdirin interfaceScmProvider- Throws:
ScmException
-
info
public InfoScmResult info(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
infoin interfaceScmProvider- Throws:
ScmException
-
remoteInfo
public RemoteInfoScmResult remoteInfo(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException
- Specified by:
remoteInfoin interfaceScmProvider- Throws:
ScmException
-
-