KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > idaremedia > antx > solo > tests > LocalFixtureTaskSetTest


1 /**
2  * $Id: LocalFixtureTaskSetTest.java 180 2007-03-15 12:56:38Z ssmc $
3  * Copyright 2004 iDare Media, Inc. All rights reserved.
4  *
5  * Originally written by iDare Media, Inc. for release into the public domain. This
6  * library, source form and binary form, is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License (LGPL) as published
8  * by the Free Software Foundation; either version 2.1 of the License, or (at your option)
9  * any later version.<p>
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU LGPL for more details.<p>
14  *
15  * You should have received a copy of the GNU Lesser General Public License along with this
16  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite
17  * 330, Boston, MA 02111-1307 USA. The GNU LGPL can be found online at
18  * http://www.fsf.org/copyleft/lesser.html<p>
19  *
20  * This product has been influenced by several projects within the open-source community.
21  * The JWare developers wish to acknowledge the open-source community's support. For more
22  * information regarding the open-source products used within JWare, please visit the
23  * JWare website.
24  *----------------------------------------------------------------------------------------*
25  * WEBSITE- http://www.jware.info EMAIL- inquiries@jware.info
26  *----------------------------------------------------------------------------------------*
27  **/

28
29 package com.idaremedia.antx.solo.tests;
30
31 import java.util.Map JavaDoc;
32
33 import junit.framework.TestSuite;
34
35 import com.idaremedia.antx.solo.LocalFixtureTaskSet;
36 import com.idaremedia.antx.ut.HTC;
37 import com.idaremedia.antx.ut.HTCUtils;
38
39
40 /**
41  * Unit test for {@linkplain com.idaremedia.antx.solo.LocalFixtureTaskSet
42  * LocalFixtureTaskSet}.
43  *
44  * @since JWare/AntX 0.4
45  * @author ssmc, &copy;2004 <a HREF="http://www.jware.info">iDare&nbsp;Media,&nbsp;Inc.</a>
46  * @version 0.5
47  * @.safety single
48  * @.group impl,test
49  * @see com.idaremedia.antx.ownhelpers.ScopedProperties ScopedProperties
50  * @see com.idaremedia.antx.solo.LocalFixtureTaskSet LocalFixtureTaskSet
51  **/

52
53 public final class LocalFixtureTaskSetTest extends HTC
54 {
55     /** <i>PET</i> Test Category. **/
56     public static final String JavaDoc TEST_CATEGORY="CLASS";
57
58
59     /**
60      * Create new LocalFixtureTaskSetTest testcase.
61      **/

62     public LocalFixtureTaskSetTest(String JavaDoc methodName)
63     {
64         super("LocalFixtureTaskSet::",methodName);
65     }
66
67
68     /**
69      * Create full test suite for LocalFixtureTaskSetTest.
70      **/

71     public static TestSuite suite()
72     {
73         return new TestSuite(LocalFixtureTaskSetTest.class);
74     }
75
76
77     /**
78      * Create baseline test suite for LocalFixtureTaskSetTest (same as full).
79      **/

80     public static TestSuite baseline()
81     {
82         return suite();
83     }
84
85
86     /**
87      * Make this test (standalone) self-running.
88      **/

89     public static void main(String JavaDoc[] argv)
90     {
91         HTCUtils.quickCheck(suite());
92     }
93
94 // ---------------------------------------------------------------------------------------------------------
95
// --------------------------------------- [ Misc Factory Methods ] ----------------------------------------
96
// ---------------------------------------------------------------------------------------------------------
97

98     protected void setUp() throws Exception JavaDoc
99     {
100         configureProjectFromResource("localfix.xml");
101     }
102
103
104 // ---------------------------------------------------------------------------------------------------------
105
// ------------------------------------------- [ The Test Cases ] ------------------------------------------
106
// ---------------------------------------------------------------------------------------------------------
107

108     public void checkBaseline()
109     {
110         //--Ensures setUp() works and can find our xml file!
111
}
112
113     public void testBaseline()
114     {
115         checkBaseline();
116     }
117
118     /**
119      * Verifies that meta attribute interpreted as expected.
120      */

121     public void testMetaOption_AntX04()
122     {
123         LocalFixtureTaskSet out = new LocalFixtureTaskSet();
124         out.setProject(getProject());
125         out.setMeta("name=ralph,phoneno=123456,marker,height=65ins");
126         assertNotWhitespace(out.getMeta());
127         Map JavaDoc map = out.getMetaMap();
128         assertNotNil(map);
129         assertEqual(map.size(),4,"ItemCount of Map");
130         assertEqual(map.get("name"),"ralph");
131         assertEqual(map.get("height"),"65ins");
132         assertEqual(map.get("phoneno"),"123456");
133         assertEqual(map.get("marker"),"");
134     }
135
136     public void testNestedRunAsExpected_AntX04()
137     {
138         runTarget("testNestedRunAsExpected_AntX04");
139     }
140
141     public void testMetaNotInstalled_AntX04()
142     {
143         runTarget("testMetaNotInstalled_AntX04");
144     }
145
146     public void testUnderscoreReplacement_AntX04()
147     {
148         runTarget("testUnderscoreReplacement_AntX04");
149     }
150
151     public void testOverrideExistingGlobal_AntX04()
152     {
153         runTarget("testOverrideExistingGlobal_AntX04");
154     }
155
156     public void testDefineGlobalFromLocal_AntX04()
157     {
158         runTarget("testDefineGlobalFromLocal_AntX04");
159     }
160
161     public void testDefineLocalOnly_AntX04()
162     {
163         runTarget("testDefineLocalOnly_AntX04");
164     }
165
166     public void testNestedLinkedScoped_AntX04()
167     {
168         runTarget("testNestedLinkedScoped_AntX04");
169     }
170
171     public void testEncodedValues_AntX04()
172     {
173         runTarget("testEncodedValues_AntX04");
174     }
175
176     public void testLoadFromExternal_AntX04()
177     {
178         runTarget("testLoadFromExternal_AntX04");
179     }
180     
181     public void testHandleNamespacedItems_AntX05()
182     {
183         runTarget("testHandleNamespacedItems_AntX05");
184     }
185 }
186
187 /* end-of-LocalFixtureTaskSetTest.java */
188
Popular Tags