public void TestVirtualHandler(bool useCompiledXaml) { var layout = new SubForEvents(useCompiledXaml); Assert.AreEqual(0, layout.baseForVirtualClicked); Assert.AreEqual(0, layout.overrideClicked); layout.elementWithVirtualHandler.SendClicked(); Assert.AreEqual(0, layout.baseForVirtualClicked); Assert.AreEqual(1, layout.overrideClicked); }
public void TestStaticHandler(bool useCompiledXaml) { try { var layout = new SubForEvents(useCompiledXaml); Assert.AreEqual(0, staticClicked); layout.elementWithStaticHandler.SendClicked(); Assert.AreEqual(1, staticClicked); } finally { staticClicked = 0; } }