*
* @throws Exception for any problem
*/
public void testToString() throws Exception
{
TableMetaType tableType = initTableType();
TableValueSupport data = new TableValueSupport(tableType);
CompositeValue compData = initCompositeValue(data);
CompositeValue compData2 = initCompositeValue2(data);
CompositeValue compData3 = initCompositeValue4(data);
data.putAll(new CompositeValue[] { compData, compData2, compData3 });
String toString = data.toString();
assertTrue("toString() should contain the tabular type", toString.indexOf(tableType.toString()) != -1);
assertTrue("toString() should contain index=compositeValue for compData",
toString.indexOf(Arrays.asList(data.calculateIndex(compData)) + "=" + compData) != -1);
assertTrue("toString() should contain index=compositeValue for compData2",
toString.indexOf(Arrays.asList(data.calculateIndex(compData2)) + "=" + compData2) != -1);
assertTrue("toString() should contain index=compositeValue for compData3",