* tests that given a simple input stream with one workbook and sheet
* that those models are processed and returned.
*/
public void testRun()
{
Model temp = null;
Iterator mi = null;
if (factory.listeners.size() != 0) {
factory = new ModelFactory();
}
factory.registerListener(new MFListener(models));
factory.run(in);
assertTrue("Models size must be 2 was = "+models.size(),
models.size() == 2);
mi = models.iterator();
temp = (Model)mi.next();
assertTrue("First model is Workbook was " + temp.getClass().getName(),
temp instanceof Workbook);
temp = (Model)mi.next();
assertTrue("Second model is Sheet was " + temp.getClass().getName(),
temp instanceof Sheet);
}