Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java view on Meta::CPAN
}
/**
* internal class to describe an expected commit item
*/
class MyCommitItem
{
/**
* the path of the item
*/
String myPath;
/**
* the kind of node (file, directory or none, see NodeKind)
*/
NodeKind myNodeKind;
/**
* the reason why this item is committed (see CommitItemStateFlag)
*/
int myStateFlags;
/**
* the url of the item
*/
String myUrl;
/**
* build one expected commit item
* @param path the expected path
* @param nodeKind the expected node kind
* @param stateFlags the expected state flags
* @param url the expected url
*/
private MyCommitItem(String path, NodeKind nodeKind, int stateFlags,
String url)
{
myPath = path;
myNodeKind = nodeKind;
myStateFlags = stateFlags;
myUrl = url;
}
/**
* Check if the commit item has the expected data
* @param ci the commit item to check
* @param key the key of the item
*/
private void test(CommitItem ci, String key)
{
assertEquals("commit item path", myPath, ci.getPath());
assertEquals("commit item node kind", myNodeKind, ci.getNodeKind());
assertEquals("commit item state flags", myStateFlags,
ci.getStateFlags());
assertEquals("commit item url", myUrl, ci.getUrl());
// after the test, remove the item from the expected map
expectedCommitItems.remove(key);
}
}
class MyNotifier implements ClientNotifyCallback
{
/**
* Handler for Subversion notifications.
* <p/>
* Override this function to allow Subversion to send notifications
*
* @param info everything to know about this event
*/
public void onNotify(ClientNotifyInformation info)
{
}
}
private class MyStatusCallback implements StatusCallback
{
private List<Status> statuses = new ArrayList<Status>();
public void doStatus(String path, Status status)
{
if (status != null)
statuses.add(status);
}
public Status[] getStatusArray()
{
return (Status[]) statuses.toArray(new Status[statuses.size()]);
}
}
}
( run in 1.426 second using v1.01-cache-2.11-cpan-df04353d9ac )