Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 83639 invoked from network); 30 Dec 2009 08:29:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Dec 2009 08:29:13 -0000 Received: (qmail 64134 invoked by uid 500); 30 Dec 2009 08:29:13 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 64059 invoked by uid 500); 30 Dec 2009 08:29:13 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 64050 invoked by uid 99); 30 Dec 2009 08:29:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 08:29:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 08:29:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 42B552388A1A; Wed, 30 Dec 2009 08:28:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: notifications@ant.apache.org From: kevj@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091230082850.42B552388A1A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 { }