Author: rdonkin
Date: Tue Jun 28 14:23:50 2005
New Revision: 202283

URL: http://svn.apache.org/viewcvs?rev=202283&view=rev
Log:
Unit test for bug in RC1

Added:
    
jakarta/commons/proper/betwixt/branches/RELEASE_0_7_BRANCH/src/test/org/apache/commons/betwixt/io/TestWriteIDs.java

Added: 
jakarta/commons/proper/betwixt/branches/RELEASE_0_7_BRANCH/src/test/org/apache/commons/betwixt/io/TestWriteIDs.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/branches/RELEASE_0_7_BRANCH/src/test/org/apache/commons/betwixt/io/TestWriteIDs.java?rev=202283&view=auto
==============================================================================
--- 
jakarta/commons/proper/betwixt/branches/RELEASE_0_7_BRANCH/src/test/org/apache/commons/betwixt/io/TestWriteIDs.java
 (added)
+++ 
jakarta/commons/proper/betwixt/branches/RELEASE_0_7_BRANCH/src/test/org/apache/commons/betwixt/io/TestWriteIDs.java
 Tue Jun 28 14:23:50 2005
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+package org.apache.commons.betwixt.io;
+
+import java.io.StringWriter;
+
+import org.apache.commons.betwixt.AbstractTestCase;
+
+/**
+ */
+public class TestWriteIDs extends AbstractTestCase {
+
+    public TestWriteIDs(String testName) {
+        super(testName);
+    }
+    public void testTest() throws Exception
+    {
+        PersonBean bean = new PersonBean();
+        StringWriter out = new StringWriter();
+        out.write("<?xml version='1.0'?>");
+        BeanWriter beanWriter = new BeanWriter(out);
+        
beanWriter.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);
+        beanWriter.getBindingConfiguration().setMapIDs(true);
+        beanWriter.enablePrettyPrint();
+        beanWriter.write("bean", bean);
+        
+        String expected = "<?xml version='1.0'?><bean id='1'/>";
+        xmlAssertIsomorphic(parseString(expected), parseString(out), true);
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to