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"); }
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"); }
public void OnHide() { var tool = new DelegateEditorTool <string>(() => ""); var num = 0; tool.onHide += () => num++; tool.Show(); tool.Hide(); Assert.AreEqual(1, num); }