public void TestEventConnection (bool useCompiledXaml) { Issue2152 layout = null; Assert.DoesNotThrow (() => layout = new Issue2152 (useCompiledXaml)); Cell cell = null; Assert.DoesNotThrow (() => cell = layout.listview.TemplatedItems.GetOrCreateContent (0, null)); var button = cell.FindByName<Button> ("btn") as IButtonController; Assert.AreEqual (0, layout.clickcount); button.SendClicked (); Assert.AreEqual (1, layout.clickcount); }
public void TestEventConnection(bool useCompiledXaml) { Issue2152 layout = null; Assert.DoesNotThrow(() => layout = new Issue2152(useCompiledXaml)); Cell cell = null; Assert.DoesNotThrow(() => cell = layout.listview.TemplatedItems.GetOrCreateContent(0, null)); var button = cell.FindByName <Button>("btn") as IButtonController; Assert.AreEqual(0, layout.clickcount); button.SendClicked(); Assert.AreEqual(1, layout.clickcount); }