rdonkin 2004/09/12 10:38:09
Modified: betwixt Tag: RELEASE_0_6_BRANCH project.xml
betwixt/src/test/org/apache/commons/betwixt/schema Tag:
RELEASE_0_6_BRANCH TestSchemaGeneration.java
TestSchemaValidity.java
Log:
Upgraded to latest digester release and added tests broken by bug in last digester release.
Revision Changes Path
No revision
No revision
1.40.2.3 +12 -2 jakarta-commons/betwixt/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/project.xml,v
retrieving revision 1.40.2.2
retrieving revision 1.40.2.3
diff -u -r1.40.2.2 -r1.40.2.3
--- project.xml 4 Aug 2004 22:16:53 -0000 1.40.2.2
+++ project.xml 12 Sep 2004 17:38:09 -0000 1.40.2.3
@@ -149,8 +149,10 @@
</dependency>
<dependency>
- <id>commons-digester</id>
- <version>1.5</version>
+ <groupId>commons-digester</groupId>
+ <typeId>jar</typeId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.6</version>
<url>http://jakarta.apache.org/commons/digester.html</url>
</dependency>
@@ -198,6 +200,14 @@
</resource>
</resources>
</unitTest>
+ <resources>
+ <resource>
+ <directory>${pom.build.sourceDirectory}</directory>
+ <includes>
+ <include>**/*.betwixt</include>
+ </includes>
+ </resource>
+ </resources>
</build>
No revision
No revision
1.2.2.1 +6 -11 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/schema/TestSchemaGeneration.java
Index: TestSchemaGeneration.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/schema/TestSchemaGeneration.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- TestSchemaGeneration.java 13 Jun 2004 21:32:48 -0000 1.2
+++ TestSchemaGeneration.java 12 Sep 2004 17:38:09 -0000 1.2.2.1
@@ -34,12 +34,7 @@
super(name);
}
- public void testDummy() {
- // the tests here require digester CVS HEAD to function correctly
- // they should be readded as soon as the digester release has been created
- }
-
- public void _testSimplestBeanWithAttributes() throws Exception {
+ public void testSimplestBeanWithAttributes() throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
Schema schema = transcriber.generate(SimplestBean.class);
@@ -65,7 +60,7 @@
}
- public void _testSimplestBeanWithElement() throws Exception {
+ public void testSimplestBeanWithElement() throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
Schema schema = transcriber.generate(SimplestElementBean.class);
@@ -91,7 +86,7 @@
xmlAssertIsomorphicContent(parseString(expected), parseString(xsd));
}
- public void _testSimpleBean() throws Exception {
+ public void testSimpleBean() throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
Schema schema = transcriber.generate(SimpleBean.class);
@@ -120,7 +115,7 @@
}
- public void _testOrderLineBean() throws Exception {
+ public void testOrderLineBean() throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
transcriber.getXMLIntrospector().getConfiguration().setAttributeNameMapper(new
HyphenatedNameMapper());
@@ -155,7 +150,7 @@
xmlAssertIsomorphicContent(parseString(expected), parseString(xsd), true);
}
- public void _testOrder() throws Exception {
+ public void testOrder() throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
transcriber.getXMLIntrospector().getConfiguration().setElementNameMapper(new HyphenatedNameMapper());
transcriber.getXMLIntrospector().getConfiguration().setAttributeNameMapper(new
HyphenatedNameMapper());
1.2.2.1 +8 -13 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/schema/TestSchemaValidity.java
Index: TestSchemaValidity.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/schema/TestSchemaValidity.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- TestSchemaValidity.java 13 Jun 2004 21:32:48 -0000 1.2
+++ TestSchemaValidity.java 12 Sep 2004 17:38:09 -0000 1.2.2.1
@@ -40,11 +40,6 @@
super(name);
}
- public void testDummy() {
- // the tests here require digester CVS HEAD to function correctly
- // they should be readded as soon as the digester release has been created
- }
-
private String generateSchema(Class clazz) throws Exception {
SchemaTranscriber transcriber = new SchemaTranscriber();
transcriber.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
@@ -61,7 +56,7 @@
return xsd;
}
- public void _testSimplestBeanWithAttributes() throws Exception {
+ public void testSimplestBeanWithAttributes() throws Exception {
String xsd = generateSchema(SimplestBean.class);
StringWriter out = new StringWriter();
@@ -79,7 +74,7 @@
}
- public void _testSimplestBeanWithElements() throws Exception {
+ public void testSimplestBeanWithElements() throws Exception {
String xsd = generateSchema(SimplestElementBean.class);
StringWriter out = new StringWriter();
@@ -97,7 +92,7 @@
}
- public void _testSimpleBean() throws Exception {
+ public void testSimpleBean() throws Exception {
String xsd = generateSchema(SimpleBean.class);
StringWriter out = new StringWriter();
@@ -131,7 +126,7 @@
return xsd;
}
- public void _testOrderLine() throws Exception {
+ public void testOrderLine() throws Exception {
String xsd = generateOrderLineSchema();
StringWriter out = new StringWriter();
@@ -168,7 +163,7 @@
return xsd;
}
- public void _testOrder() throws Exception {
+ public void testOrder() throws Exception {
String xsd = generateOrderSchema();
StringWriter out = new StringWriter();
out.write("<?xml version='1.0'?>");
@@ -188,7 +183,7 @@
writer.write(bean);
String xml = out.getBuffer().toString();
-
+
xmlAssertIsValid(new InputSource(new StringReader(xml)), new InputSource(new StringReader(xsd)));
}
@@ -209,7 +204,7 @@
return xsd;
}
- public void _testRSS() throws Exception {
+ public void testRSS() throws Exception {
String xsd = generateRSSSchema();
StringWriter out = new StringWriter();
out.write("<?xml version='1.0'?>");
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|