001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018:
019: package org.apache.tools.ant.taskdefs;
020:
021: import org.apache.tools.ant.BuildFileTest;
022:
023: public class LengthTest extends BuildFileTest {
024:
025: public LengthTest(String name) {
026: super (name);
027: }
028:
029: public void setUp() {
030: configureProject("src/etc/testcases/taskdefs/length.xml");
031: }
032:
033: public void tearDown() {
034: executeTarget("cleanup");
035: }
036:
037: public void testEach() {
038: executeTarget("testEach");
039: }
040:
041: public void testEachCondition() {
042: executeTarget("testEachCondition");
043: }
044:
045: public void testAll() {
046: executeTarget("testAll");
047: }
048:
049: public void testAllCondition() {
050: executeTarget("testAllCondition");
051: }
052:
053: public void testFile() {
054: executeTarget("testFile");
055: }
056:
057: public void testFileCondition() {
058: executeTarget("testFileCondition");
059: }
060:
061: public void testBoth() {
062: executeTarget("testBoth");
063: }
064:
065: public void testBothCondition() {
066: executeTarget("testBothCondition");
067: }
068:
069: public void testDupes() {
070: executeTarget("testDupes");
071: }
072:
073: public void testDupesCondition() {
074: executeTarget("testDupesCondition");
075: }
076:
077: public void testString() {
078: executeTarget("testString");
079: }
080:
081: public void testStringCondition() {
082: executeTarget("testStringCondition");
083: }
084:
085: public void testTrimString() {
086: executeTarget("testTrimString");
087: }
088:
089: public void testTrimStringCondition() {
090: executeTarget("testTrimStringCondition");
091: }
092:
093: public void testNoTrimString() {
094: executeTarget("testNoTrimString");
095: }
096:
097: public void testNoTrimStringCondition() {
098: executeTarget("testNoTrimStringCondition");
099: }
100:
101: public void testStringFile() {
102: expectBuildExceptionContaining("testStringFile", "should fail",
103: "incompatible");
104: }
105:
106: public void testTrimFile() {
107: expectBuildExceptionContaining("testTrimFile", "should fail",
108: "string length function only");
109: }
110:
111: public void testImmutable() {
112: executeTarget("testImmutable");
113: }
114:
115: public void testZipFileSet() {
116: executeTarget("testZipFileSet");
117: }
118:
119: public void testZipFileSetCondition() {
120: executeTarget("testZipFileSetCondition");
121: }
122:
123: }
|