Example #1
0
        public void Test_Action()
        {
            var mbox = new MailBox ("Address");
            var recv = 0;

            mbox.Action += new MailBoxAction ((from, adress, letter) => {
                recv += 1;
            });
            mbox.Action += new MailBoxAction ((from, adress, letter) => {
                recv += 1;
            });

            // 登録済みアクションの起動
            mbox.OnMailBox (null, "address", null);

            Assert.AreEqual (2, recv);
        }