Beispiel #1
0
        public void Raise()
        {
            bool eventFired = false;
            var foo = new Foo();

            foo.MyEvent += (sender, args) =>
            {
                eventFired = true;
                Assert.AreEqual(foo, sender);
                Assert.AreEqual(EventArgs.Empty, args);
            };

            foo.FireEvent();

            Assert.IsTrue(eventFired);
        }