return new XmlIocLoader(fileName);
}
@Test
public void testXmlIocLoader() throws ObjectLoadException {
IocLoader iocLoader = getNew("org/nutz/ioc/loader/xml/conf/zzh-offered.xml");
assertTrue(iocLoader.getName() != null);
assertTrue(iocLoader.getName().length > 0);
for (String name : iocLoader.getName()) {
assertNotNull(name);
assertNotNull(iocLoader.load(null, name));
IocObject iocObject = iocLoader.load(null, name);
if (iocObject.hasArgs()) {
for (IocValue iocValue : iocObject.getArgs()) {
iocValue.getType();
iocValue.getValue();
checkValue(iocValue);
}
}
if (iocObject.getFields() != null) {
for (IocField iocField : iocObject.getFields()) {
assertNotNull(iocField.getName());
if (iocField.getValue() != null) {
IocValue iocValue = iocField.getValue();
checkValue(iocValue);
}
}
}
}
iocLoader.load(null, "obj").getFields()[0].getValue().getValue();
}