Exemplo n.º 1
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");
        }
Exemplo n.º 2
0
        public void HideBeforeShow()
        {
            var tool = new DelegateEditorTool <string>(() => "");
            int num  = 0;

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

            Assert.AreEqual(null, tool.target);
            Assert.IsFalse(tool.Active);
            Assert.AreEqual(0, num, "OnHide was called");
        }
Exemplo n.º 3
0
        public void OnHide()
        {
            var tool = new DelegateEditorTool <string>(() => "");
            var num  = 0;

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

            tool.Show();
            tool.Hide();

            Assert.AreEqual(1, num);
        }