maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [38/50] [abbrv] git commit: add new test case for remoteinfo command
Date Mon, 15 Jul 2013 11:24:49 GMT
add new test case for remoteinfo command


Project: http://git-wip-us.apache.org/repos/asf/maven-scm/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-scm/commit/e8b2de9e
Tree: http://git-wip-us.apache.org/repos/asf/maven-scm/tree/e8b2de9e
Diff: http://git-wip-us.apache.org/repos/asf/maven-scm/diff/e8b2de9e

Branch: refs/heads/master
Commit: e8b2de9e99b6bfb6a2f741e63f5f3c1cac468239
Parents: b8b9d81
Author: imod <domi@fortysix.ch>
Authored: Fri Jul 12 09:32:45 2013 +0200
Committer: imod <domi@fortysix.ch>
Committed: Fri Jul 12 09:32:45 2013 +0200

----------------------------------------------------------------------
 .../JGitRemoteInfoCommandTckTest.java           | 42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-scm/blob/e8b2de9e/src/test/java/org/apache/maven/scm/provider/git/jgit/command/remoteinfo/JGitRemoteInfoCommandTckTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/scm/provider/git/jgit/command/remoteinfo/JGitRemoteInfoCommandTckTest.java
b/src/test/java/org/apache/maven/scm/provider/git/jgit/command/remoteinfo/JGitRemoteInfoCommandTckTest.java
new file mode 100644
index 0000000..f94c536
--- /dev/null
+++ b/src/test/java/org/apache/maven/scm/provider/git/jgit/command/remoteinfo/JGitRemoteInfoCommandTckTest.java
@@ -0,0 +1,42 @@
+package org.apache.maven.scm.provider.git.jgit.command.remoteinfo;
+
+import org.apache.maven.scm.command.remoteinfo.RemoteInfoScmResult;
+import org.apache.maven.scm.provider.ScmProviderRepository;
+import org.apache.maven.scm.provider.git.GitScmTestUtils;
+import org.apache.maven.scm.provider.git.command.remoteinfo.AbstractGitRemoteInfoCommandTckTest;
+import org.apache.maven.scm.provider.git.repository.GitScmProviderRepository;
+
+/**
+ * 
+ * @author Dominik Bartholdi (imod)
+ */
+public class JGitRemoteInfoCommandTckTest extends AbstractGitRemoteInfoCommandTckTest
+{
+
+    @Override
+    protected void checkResult( RemoteInfoScmResult result )
+    {
+        assertEquals( 1, result.getBranches().size() );
+        assertEquals( "92f139dfec4d1dfb79c3cd2f94e83bf13129668b", result.getBranches().get(
"master" ) );
+
+        assertEquals( 0, result.getTags().size() );
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getScmUrl()
+        throws Exception
+    {
+    	String scmUrl = GitScmTestUtils.getScmUrl( getRepositoryRoot(), "jgit" );
+    	System.out.println("SCM: "+scmUrl);
+        return scmUrl;
+    }
+
+    @Override
+    protected ScmProviderRepository getScmProviderRepository()
+        throws Exception
+    {
+        return new GitScmProviderRepository( getScmUrl().substring( "scm:jgit:".length()
) );
+    }
+}


Mime
View raw message