{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.simpleArray.0", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.simpleArray.0", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(Integer.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.simpleList.0", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.simpleList.0", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(Integer.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.simpleSet.0", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.simpleSet.0", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(Integer.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.simpleMap.key", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.simpleMap.key", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(Integer.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.javaBean2Array.0.id", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.javaBean2Array.0.id", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(int.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.javaBean2List.0.id", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.javaBean2List.0.id", re.getKey());
Assert.assertEquals("illegalValue",re.getSourceObject());
Assert.assertEquals(int.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.javaBean2Set.0.id", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.javaBean2Set.0.id", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(int.class, re.getTargetType());
}
{
Map<String,Object> src=new HashMap<String, Object>();
src.put("0.javaBean2Map.0.id", "illegalValue");
MapConvertException re=null;
try
{
converter.convert(src, ComplexJavaBean[].class);
}
catch(MapConvertException e)
{
re=e;
}
Assert.assertEquals("0.javaBean2Map.0.id", re.getKey());
Assert.assertEquals("illegalValue", re.getSourceObject());
Assert.assertEquals(int.class, re.getTargetType());
}
}