{
String[] itemNames = new String[] { "name1", "name2" };
String[] itemDescriptions = new String[] { "desc1", "desc2" };
MetaType[] itemTypes = new MetaType[] { SimpleMetaType.STRING, SimpleMetaType.INTEGER };
CompositeMetaType compositeType = new ImmutableCompositeMetaType("typeName", "description", itemNames, itemDescriptions, itemTypes);
TableMetaType tableType = new ImmutableTableMetaType("typeName", "description", compositeType, new String[] { "name1" });
TableValue tv = new MockTableValue(tableType);
TableValue[][] tabData1 = new TableValue[][]
{
{ tv, null }, { tv, tv }
};
ArrayMetaType tabArrayType1 = new ArrayMetaType(2, tableType);
assertTrue("tabData1 should be a value of array type", tabArrayType1.isValue(tabData1));
ArrayMetaType tabArrayType2 = new ArrayMetaType(1, tableType);
assertFalse("tabData1 should not be a value of array type, wrong number of dimensions", tabArrayType2.isValue(tabData1));
TableMetaType tableType2 = new ImmutableTableMetaType("typeName2", "description", compositeType, new String[] { "name1" });
ArrayMetaType tabArrayType3 = new ArrayMetaType(2, tableType2);
assertFalse("tabData1 should not be a value of array type, wrong element type", tabArrayType3.isValue(tabData1));
}