Index: lutingenerator/src/test/org/codelutin/generator/UIModelGeneratorTest.java diff -u /dev/null lutingenerator/src/test/org/codelutin/generator/UIModelGeneratorTest.java:1.1 --- /dev/null Tue Aug 10 17:12:21 2004 +++ lutingenerator/src/test/org/codelutin/generator/UIModelGeneratorTest.java Tue Aug 10 17:12:16 2004 @@ -0,0 +1,72 @@ +/* *##% + * Copyright (C) 2002, 2003 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * UIModelGeneratorTest.java + * + * Created: Aug 9, 2004 + * + * @author Benjamin Poussin + * Copyright Code Lutin + * @version $Revision: 1.1 $ + * + * Mise a jour: $Date: 2004/08/10 17:12:16 $ + * par : $Author: mazelier $ + */ + +package org.codelutin.generator; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import java.io.File; + +import org.codelutin.generator.models.ui.javaxml.JavaXMLParser; +import org.codelutin.generator.models.ui.UIModel; +import org.codelutin.generator.models.ui.impl.UIModelImpl; +import org.codelutin.util.Resource; +import java.net.URL; + +public class UIModelGeneratorTest extends TestCase { // UIModelGeneratorTest + + public void testGenerate() throws Exception { + +// URL testFile = Resource.getURL("/org/codelutin/generator/test.javaxml"); + File testFile = new File("src/test/org/codelutin/generator/test.javaxml"); + +// File[] tabUIFilesName = new File[1]; +// tabUIFilesName[0] = testFile; +// File destDir = new File("/home/mazelier/PROJECT/lutingenerator/src/test/org/codelutin/generator/destDir"); +// +// UIModelGenerator generator = new UIModelGenerator(); + //generator.generate(tabUIFilesName, destDir); + + JavaXMLParser parser = new JavaXMLParser(); + UIModel ui = parser.parse(testFile); + System.out.println("ui "+ ((UIModelImpl)ui).toString()); + + assertNotNull(ui.getRoot()); + } + + public static Test suite() { + return new TestSuite(UIModelGeneratorTest.class); + } + +} // UIModelGeneratorTest +