use of org.apache.maven.scm.command.remoteinfo.RemoteInfoScmResult in project maven-scm by apache.
the class GitRemoteInfoConsumerTest method testConsumerRemoteInfo.
public void testConsumerRemoteInfo() {
GitRemoteInfoConsumer consumer = new GitRemoteInfoConsumer(new DefaultLog(), null);
consumer.consumeLine("344581899752998038a74989142221ae08c381bc HEAD");
consumer.consumeLine("344581899752998038a74989142221ae08c381bc refs/heads/master");
consumer.consumeLine("9006c3dbaa9749aa435694f261638583c9088419 refs/tags/staging");
RemoteInfoScmResult remoteInfoScmResult = consumer.getRemoteInfoScmResult();
assertEquals(1, remoteInfoScmResult.getBranches().size());
assertEquals("344581899752998038a74989142221ae08c381bc", remoteInfoScmResult.getBranches().get("master"));
assertEquals(1, remoteInfoScmResult.getTags().size());
assertEquals("9006c3dbaa9749aa435694f261638583c9088419", remoteInfoScmResult.getTags().get("staging"));
}
Aggregations