/**
* Test method for {@link jxl.read.biff.WorkbookParser#parse()}.
*/
public void testVariableResolving() {
final String nm = "var1.xls";
Book book = new ExcelImporter().imports(getClass().getResource("/"+nm));
Sheet sheet1 = (Sheet) book.getSheets().get(0);
assertEquals("=ABCD.value.text", sheet1.getCell(0,0).getEditText());
assertEquals("=ivan", sheet1.getCell(1,0).getEditText());
assertEquals("=ivnulla", sheet1.getCell(2,0).getEditText());
assertEquals("#NAME?", sheet1.getCell(0,0).getText());
Map map = new HashMap();
SimpleResolver resolver = new SimpleResolver(map);
map.put("ABCD", new VarObject("Hello ZK"));
book.addVariableResolver(resolver);
SimpleSSDataListener listener = new SimpleSSDataListener();
book.addSSDataListener(listener);
book.notifyChange(new String[] {"ABCE"});
List events = listener.getList();
assertEquals(0, events.size());
book.notifyChange(new String[] {"ABCD"});
events = listener.getList();
assertEquals(1, events.size());
SSDataEvent event = (SSDataEvent) events.get(0);
Range rng = event.getRange();