@Test public void testClickHandler() throws Exception { Section s = mTester.prepare( VerySimpleGroupSection.create(mTester.getContext()).numberOfDummy(4).build()); SectionsTestHelper.dispatchEvent( s, VerySimpleGroupSection.onImageClick(mTester.getScopedContext(s)), new ClickEvent()); VerySimpleGroupSection.VerySimpleGroupSectionStateContainer stateContainer = mTester.getStateContainer(s); assertThat(stateContainer.extra).isEqualTo(3); }
@OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); }
VerySimpleGroupSectionSpec { @OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); } }
VerySimpleGroupSectionSpec { @OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); }  }
VerySimpleGroupSectionSpec { @OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); }   }
VerySimpleGroupSectionSpec { @OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); }    }