ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r894566 - /ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java
Date Wed, 30 Dec 2009 08:28:50 GMT
Author: kevj
Date: Wed Dec 30 08:28:49 2009
New Revision: 894566

URL: http://svn.apache.org/viewvc?rev=894566&view=rev
Log:
-add test for validate

Modified:
    ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java

Modified: ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java?rev=894566&r1=894565&r2=894566&view=diff
==============================================================================
--- ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java
(original)
+++ ant/sandbox/antlibs/git/trunk/src/tests/junit/org/apache/ant/git/AbstractGitTaskTest.java
Wed Dec 30 08:28:49 2009
@@ -3,6 +3,8 @@
 import junit.framework.Assert;
 import junit.framework.TestCase;
 
+import org.apache.tools.ant.BuildException;
+
 public class AbstractGitTaskTest extends TestCase {
 	
 	//TODO - need to consider special cases like 'origin'
@@ -34,6 +36,17 @@
 		
 	}
 	
+	public void testValidate() throws Exception {
+		TestGitTask t = new TestGitTask();
+		try {
+			t.validate();
+		} catch(BuildException e) {
+			Assert.assertEquals("You must specify a gitRepo value",e.getMessage());
+		} catch(Exception e) {
+			Assert.fail("Expected BuildException");
+		}
+	}
+	
 	private class TestGitTask extends AbstractGitTask {
 		
 	}



Mime
View raw message