krysalis-update/src/test/java/org/apache/depot/update/ant/sync reposync.xml,NONE,1.1 SynchronizeTaskTests.java,NONE,1.1
Nick Chalko <[email protected]> Wed, 08 Dec 2004 09:07:22 +0000
| Newsgroups | gmane.comp.krysalis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/krysalis/krysalis-update/src/test/java/org/apache/depot/update/ant/sync
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24726/src/test/java/org/apache/depot/update/ant/sync
Added Files:
reposync.xml SynchronizeTaskTests.java
Log Message:
Copied from the apache incubator.
--- NEW FILE: SynchronizeTaskTests.java ---
/*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.depot.update.ant.sync;
import junit.framework.Assert;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.BuildFileTest;
/**
*
* @author $Author: chalko $
* @version $Revision: 1.1 $
*/
public class SynchronizeTaskTests extends BuildFileTest {
/**
* Constructor for RuperDependTaskTest.
* @param arg0
*/
public SynchronizeTaskTests(String arg0) {
super(arg0);
}
public static void main(String[] args) {
junit.textui.TestRunner.run(SynchronizeTaskTests.class);
}
public void setUp() {
configureProject("src/test/org/apache/depot/update/ant/sync/reposync.xml");
}
public void test1() {
executeTarget("test1");
}
public void test3() {
boolean passed = false;
try {
executeTarget("test2");
}
catch (BuildException be) {
passed = true;
}
if (!passed)
Assert.fail("Should've complained about no arguments...");
}
}
--- NEW FILE: reposync.xml ---
<?xml version="1.0"?>
<project name="ruper-synchronize-test" basedir="." default="all">
<taskdef resource="depot-update-antlib.xml"/>
<target name="test1">
<reposync group="test" />
</target>
<target name="test2">
<!-- Intended to fail w/ "no args" message -->
<reposync />
</target>
<target name="all" depends="test1,test2" />
</project>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/