| Issue 62: | Lucyでxmlから設定する場合にリテラルが設定できない | |
| 1 person starred this issue and may be notified of changes. | Back to list |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE lucy-config PUBLIC "-//LUCY//DTD LUCY//EN" "http://www.lucy.org/dtd/lucy-config.dtd"> <lucy-config> <component class="lucy.behavior.InjectCallee"> <inject method="setHoge">"aaaaa"</inject> </component> </lucy-config> public class InjectBehaviorTest extends LucyTestCase { @Override public void setUp() throws Exception { super.setUp(); getLucy().load("lucy/behavior/Inject.xml"); } public void testInject() throws Exception { InjectCallee ic = getLucy().get(InjectCallee.class); assertEquals("aaaaa", ic.getHoge()); } } 問題はInjectBehaviorの if (propertyDesc.hasExpression()) { o = evaluateExpression(propertyDesc, lucy); } o = lucy.get(propertyType); となっているので式評価結果が上書きされている。 また配列で帰ってくるので、そこらへんも評価しないといけない。
Jul 30, 2008
Project Member
#1
shinpei.ohtani@gmail.com
Status:
Fixed
|