assertEquals(6, jspFragment.count);
jspFragment.count = 0;
jspFragment.invokeCallback = new MockJspFragment.InvokeCallback() {
public void onInvoke(int count) {
LoopIterator s = (LoopIterator) jspContext.getAttribute("s");
assertNotNull(s);
assertEquals(count, s.getCount());
assertEquals(count - 1, s.getValue());
assertEquals(count - 1, s.getIndex());
assertEquals(count % s.getModulusValue(), s.getModulus());
}
};
loopTag.setStatus("s");
loopTag.doTag();
assertNull(jspContext.getAttribute("s")); // attribute was cleared