Author: shawkins
Date: 2010-03-23 14:25:30 -0400 (Tue, 23 Mar 2010)
New Revision: 1990
Modified:
trunk/common-core/src/test/java/com/metamatrix/common/types/TestDataTypeManager.java
trunk/common-core/src/test/java/com/metamatrix/common/types/basic/TestTransforms.java
Log:
TEIID-1024 adding support for the conversion between clob and sqlxml
Modified:
trunk/common-core/src/test/java/com/metamatrix/common/types/TestDataTypeManager.java
===================================================================
---
trunk/common-core/src/test/java/com/metamatrix/common/types/TestDataTypeManager.java 2010-03-23
01:59:46 UTC (rev 1989)
+++
trunk/common-core/src/test/java/com/metamatrix/common/types/TestDataTypeManager.java 2010-03-23
18:25:30 UTC (rev 1990)
@@ -76,8 +76,8 @@
/*timestamp*/ {
'I','N','N','N','N','N','N','N','N','N','N','C','C','O','I','N','N','N'
},
/*object*/ {
'C','C','C','C','C','C','C','C','C','C','C','C','C','C','O','C','C','C'
},
/*blob*/ {
'N','N','N','N','N','N','N','N','N','N','N','N','N','N','I','O','N','N'
},
- /*clob*/ {
'C','N','N','N','N','N','N','N','N','N','N','N','N','N','I','N','O','N'
},
- /*xml*/ {
'C','N','N','N','N','N','N','N','N','N','N','N','N','N','I','N','N','O'
}
+ /*clob*/ {
'C','N','N','N','N','N','N','N','N','N','N','N','N','N','I','N','O','C'
},
+ /*xml*/ {
'C','N','N','N','N','N','N','N','N','N','N','N','N','N','I','N','C','O'
}
};
Modified:
trunk/common-core/src/test/java/com/metamatrix/common/types/basic/TestTransforms.java
===================================================================
---
trunk/common-core/src/test/java/com/metamatrix/common/types/basic/TestTransforms.java 2010-03-23
01:59:46 UTC (rev 1989)
+++
trunk/common-core/src/test/java/com/metamatrix/common/types/basic/TestTransforms.java 2010-03-23
18:25:30 UTC (rev 1990)
@@ -156,7 +156,8 @@
return (src.equals(DataTypeManager.DefaultDataTypes.STRING) &&
tgt.equals(DataTypeManager.DefaultDataTypes.XML))
|| (src.equals(DataTypeManager.DefaultDataTypes.STRING) &&
tgt.equals(DataTypeManager.DefaultDataTypes.TIME))
|| (src.equals(DataTypeManager.DefaultDataTypes.STRING) &&
tgt.equals(DataTypeManager.DefaultDataTypes.TIMESTAMP))
- || (src.equals(DataTypeManager.DefaultDataTypes.STRING) &&
tgt.equals(DataTypeManager.DefaultDataTypes.DATE));
+ || (src.equals(DataTypeManager.DefaultDataTypes.STRING) &&
tgt.equals(DataTypeManager.DefaultDataTypes.DATE))
+ || (src.equals(DataTypeManager.DefaultDataTypes.CLOB) &&
tgt.equals(DataTypeManager.DefaultDataTypes.XML));
}
@Test public void testAllConversions() throws TransformationException {
@@ -216,7 +217,7 @@
}
}
- String expected = "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>"; //$NON-NLS-1$
+ String expected = ""; //$NON-NLS-1$
expected += xml.substring(0, DataTypeManager.MAX_STRING_LENGTH -
expected.length());
helpTestTransform(new StringToSQLXMLTransform().transformDirect(xml.toString()),
expected);