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