コード例 #1
0
        public void OnShow()
        {
            var tool = new DelegateEditorTool <string>(() => "");
            var num  = 0;

            tool.onShow += () => num++;

            tool.Show();

            Assert.AreEqual(1, num);
        }
コード例 #2
0
        public void HideTwice()
        {
            var tool = new DelegateEditorTool <string>(() => "");

            tool.Show();

            int num = 0;

            tool.onHide += () => num++;
            tool.Hide();
            tool.Hide();

            Assert.AreEqual(1, num, "OnHide was called twice");
        }