|
From: <fb...@us...> - 2003-06-25 20:40:28
|
Update of /cvsroot/jgb/jgb/src/java/tests/jgb/handlers/swing
In directory sc8-pr-cvs1:/tmp/cvs-serv13702/src/java/tests/jgb/handlers/swing
Modified Files:
AllTests.java
Added Files:
TestNullTagHandler.java
Log Message:
* src/dtd/dtd.xml:
Added reference to new null tag handler.
Based on diff submitted by Steven Oglesby.
* src/java/tests/jgb/handlers/swing/TestNullTagHandler.java:
Added new tag handler tests for passing null values around.
Based on diff submitted by Steven Oglesby.
* src/java/tests/jgb/handlers/swing/AllTests.java:
Added reference to TestNullTagHandler.
Based on diff submitted by Steven Oglesby.
* src/java/core/jgb/handlers/swing/NullTagHandler.java:
Implemented tests.
Based on diff submitted by Steven Oglesby.
--- NEW FILE: TestNullTagHandler.java ---
/*
* Copyright (C) 2002, Francois Beausoleil
*
* 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 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
*
* You may contact the author of this software at: fb...@us...
*/
package jgb.handlers.swing;
import jgb.builder.TagHandler;
import jgb.handlers.TagHandlerAbstractTest;
import org.xml.sax.SAXException;
public class TestNullTagHandler extends TagHandlerAbstractTest {
public TestNullTagHandler(String s) {
super(s);
}
public void testStartElement() throws SAXException {
atts.put("class", "java.lang.String");
int oldContextSize = context.size();
handler.startElement("null", context, atts);
assertEquals(oldContextSize + 2, context.size());
assertEquals(String.class,
context.get(TagHandler.PARAMETER_CLASS_KEY));
assertEquals(null, context.get(TagHandler.PARAMETER_VALUE_KEY));
}
public void testEndElement() throws Exception {
pass();
}
protected TagHandler createHandler() {
return new NullTagHandler();
}
}
Index: AllTests.java
===================================================================
RCS file: /cvsroot/jgb/jgb/src/java/tests/jgb/handlers/swing/AllTests.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** AllTests.java 10 Jun 2003 01:50:18 -0000 1.33
--- AllTests.java 25 Jun 2003 20:40:25 -0000 1.34
***************
*** 28,31 ****
--- 28,32 ----
TestSuite suite = new TestSuite();
+ suite.addTestSuite(TestNullTagHandler.class);
suite.addTestSuite(TestRegisterTagHandler.class);
suite.addTestSuite(TestTabTagHandler.class);
|