@Test
public void parse_targetHandler() throws Exception
{
{
WebConfigurationParser parser=new WebConfigurationParser(null);
parser.parse("org/soybeanMilk/test/unit/web/TestWebConfigurationParser-0.xml");
WebConfiguration webConfiguration= parser.getWebConfiguration();
Assert.assertEquals(DefaultTypeTargetHandler.class,
webConfiguration.getTypeTargetHandler().getClass());
Assert.assertEquals(JsonTargetHandler.class,
webConfiguration.getTypeTargetHandler().getTargetHandler("json").getClass());
Assert.assertEquals(JsonTargetHandler.class,
webConfiguration.getTypeTargetHandler().getTargetHandler("forward").getClass());
Assert.assertEquals(RedirectTargetHandler.class,
webConfiguration.getTypeTargetHandler().getTargetHandler("redirect").getClass());
TargetHandler multi= webConfiguration.getTypeTargetHandler().getTargetHandler("pdf");
Assert.assertEquals(JsonTargetHandler.class, multi.getClass());
Assert.assertTrue( multi == webConfiguration.getTypeTargetHandler().getTargetHandler("mp3"));
Assert.assertTrue( multi == webConfiguration.getTypeTargetHandler().getTargetHandler("JPEG"));
}
{
WebConfigurationParser parser=new WebConfigurationParser(null);
parser.parse("org/soybeanMilk/test/unit/web/TestWebConfigurationParser-1.xml");
WebConfiguration webConfiguration= parser.getWebConfiguration();
Assert.assertEquals(MyTypeTargetHandler.class,
webConfiguration.getTypeTargetHandler().getClass());
Assert.assertEquals(JsonTargetHandler.class,