1 package org.codehaus.dataforge.engine;
2
3 /*
4 * Copyright 2001-2004 Ben Walding
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 import java.util.List;
20
21 import junit.framework.TestCase;
22
23 import org.codehaus.dataforge.engine.configuration.DataForgeConfig;
24 import org.codehaus.dataforge.engine.configuration.XMLConfiguration;
25
26 /***
27 * @author Ben Walding
28 *
29 */
30 public class LiveTest extends TestCase {
31
32 /***
33 * Constructor for LiveTest.
34 * @param arg0
35 */
36 public LiveTest(String arg0) {
37 super(arg0);
38 }
39
40 public void testA() throws Exception {
41 DataForge df = XMLConfiguration.quickConfig(LiveTest.class, "Configuration.df");
42 DataForgeConfig dfc = df.getDataForgeConfig();
43
44 List transformers = dfc.getTransformers();
45 assertEquals("xc.getTransformers.size()", 2, transformers.size());
46 // TransformerConfig g = (TransformerConfig)
47 dfc.getTransformers().get(1);
48 /*RowSource rs = (RowSource) g.getRowSources().get(0);
49 System.out.println(rs);
50 while (true) {
51 RowEvent re = rs.getNext();
52 if (re == null)
53 break;
54
55 for (int i = 0; i < re.getRowMetaData().getColumnCount(); i++) {
56 if (i > 0)
57 System.out.print(",");
58 System.out.print(re.getField(i));
59 }
60 System.out.println();
61 } */
62
63 }
64
65
66 }