public void TestUnbindEvents() { var bindable = new BindableInt { Value = 0, Default = 0, MinValue = -5, MaxValue = 5, Precision = 1, Disabled = false }; bool valueChanged = false; bool defaultChanged = false; bool disabledChanged = false; bool minValueChanged = false; bool maxValueChanged = false; bool precisionChanged = false; bindable.ValueChanged += _ => valueChanged = true; bindable.DefaultChanged += _ => defaultChanged = true; bindable.DisabledChanged += _ => disabledChanged = true; bindable.MinValueChanged += _ => minValueChanged = true; bindable.MaxValueChanged += _ => maxValueChanged = true; bindable.PrecisionChanged += _ => precisionChanged = true; bindable.UnbindEvents(); bindable.Value = 5; bindable.Default = 5; bindable.MinValue = 0; bindable.MaxValue = 10; bindable.Precision = 5; bindable.Disabled = true; Assert.That(!valueChanged && !defaultChanged && !disabledChanged && !minValueChanged && !maxValueChanged && !precisionChanged); }