M
mike
Hi,
I have the following inner class that I need to test since it is an
essential part of the functionality.
Any suggestions on how I can test the public visit method?
cheers,
//mike
private final class UpdateOperation implements IIterativeOperation {
public IStatus visit(IResource resource, int depth,
IProgressMonitor monitor) {
try {
monitor.beginTask("Updating " + resource.getFullPath(), 100);
// Sanity check - can't update something that is not part of
// clearcase
if (!hasRemote(resource)) {
return new Status(
IStatus.ERROR,
ID,
TeamException.NO_REMOTE_RESOURCE,
MessageFormat
..format(
"Resource \"{0}\" is not a ClearCase element!",
new Object[] { resource
..getFullPath().toString() }),
null);
}
IStatus result = OK_STATUS;
monitor.worked(40);
updateState(resource, IResource.DEPTH_INFINITE,
new SubProgressMonitor(monitor, 10));
return result;
} finally {
monitor.done();
}
}
}
I have the following inner class that I need to test since it is an
essential part of the functionality.
Any suggestions on how I can test the public visit method?
cheers,
//mike
private final class UpdateOperation implements IIterativeOperation {
public IStatus visit(IResource resource, int depth,
IProgressMonitor monitor) {
try {
monitor.beginTask("Updating " + resource.getFullPath(), 100);
// Sanity check - can't update something that is not part of
// clearcase
if (!hasRemote(resource)) {
return new Status(
IStatus.ERROR,
ID,
TeamException.NO_REMOTE_RESOURCE,
MessageFormat
..format(
"Resource \"{0}\" is not a ClearCase element!",
new Object[] { resource
..getFullPath().toString() }),
null);
}
IStatus result = OK_STATUS;
monitor.worked(40);
updateState(resource, IResource.DEPTH_INFINITE,
new SubProgressMonitor(monitor, 10));
return result;
} finally {
monitor.done();
}
}
}