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:
sanitizeTagName
in interfaceScmProvider
-
validateTagName
public boolean validateTagName(String tag)
- Specified by:
validateTagName
in interfaceScmProvider
-
getScmType
public String getScmType()
- Specified by:
getScmType
in interfaceScmProvider
-
setScmSpecificFilename
public void setScmSpecificFilename(String scmSpecificFilename)
-
requiresEditMode
public boolean requiresEditMode()
- Specified by:
requiresEditMode
in 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:
makeProviderScmRepository
in interfaceScmProvider
- Throws:
ScmRepositoryException
-
makeProviderScmRepository
public ScmProviderRepository makeProviderScmRepository(File path) throws ScmRepositoryException, UnknownRepositoryStructure
- Specified by:
makeProviderScmRepository
in interfaceScmProvider
- Throws:
ScmRepositoryException
UnknownRepositoryStructure
-
validateScmUrl
public List<String> validateScmUrl(String scmSpecificUrl, char delimiter)
- Specified by:
validateScmUrl
in interfaceScmProvider
-
getScmSpecificFilename
public String getScmSpecificFilename()
- Specified by:
getScmSpecificFilename
in interfaceScmProvider
-
add
public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public ChangeLogScmResult changeLog(ChangeLogScmRequest scmRequest) throws ScmException
- 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
-
checkIn
public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters) 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
public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public StatusScmResult status(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet) throws ScmException
- 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
public BlameScmResult blame(BlameScmRequest blameScmRequest) throws ScmException
- 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
-
-