* @throws Exception for any problem
*/
@SuppressWarnings("unchecked")
public void testEquals() throws Exception
{
ArrayMetaType arrayType = new ArrayMetaType(3, SimpleMetaType.STRING);
assertNotSame("null is not an array type", null, arrayType);
assertNotSame("object is not an array type", new Object(), arrayType);
assertEquals("should be equal to itself", arrayType, arrayType);
ArrayMetaType arrayType2 = new ArrayMetaType(3, SimpleMetaType.STRING);
assertEquals("should be equal, even though different instances", arrayType, arrayType2);
assertEquals("should be equal, even though different instances", arrayType2, arrayType);
arrayType2 = new ArrayMetaType(2, SimpleMetaType.STRING);
assertNotSame("should not be equal, wrong number of dimensions", arrayType, arrayType2);
assertNotSame("should not be equal, wrong number of dimensions", arrayType2, arrayType);
arrayType2 = new ArrayMetaType(3, SimpleMetaType.INTEGER);
assertNotSame("should not be equal, wrong element type", arrayType, arrayType2);
assertNotSame("should not be equal, wrong element type", arrayType2, arrayType);
}