public void AnimatableRemovePropertyNotifications() { tlog.Debug(tag, $"AnimatableRemovePropertyNotifications START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of Animatable class!"); testingTarget.RegisterProperty("dummy", new PropertyValue(6)); var dummy = testingTarget.AddPropertyNotification("dummy", PropertyCondition.GreaterThan(5)); Assert.IsNotNull(dummy, "should be not null"); Assert.IsInstanceOf <PropertyNotification>(dummy, "should be an instance of PropertyNotification class!"); var dummy2 = testingTarget.AddPropertyNotification("dummy", PropertyCondition.LessThan(10)); Assert.IsNotNull(dummy2, "should be not null"); Assert.IsInstanceOf <PropertyNotification>(dummy2, "should be an instance of PropertyNotification class!"); try { testingTarget.RemovePropertyNotifications(); } catch (Exception e) { tlog.Error(tag, "Caught Exception" + e.ToString()); LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } dummy.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableRemovePropertyNotifications END (OK)"); }
public void AnimatableAddPropertyNotification() { tlog.Debug(tag, $"AnimatableAddPropertyNotification START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of Animatable class!"); testingTarget.RegisterProperty("dummy", new PropertyValue(6)); var result = testingTarget.AddPropertyNotification("dummy", PropertyCondition.GreaterThan(5)); Assert.IsNotNull(result, "should be not null"); Assert.IsInstanceOf <PropertyNotification>(result, "should be an instance of PropertyNotification class!"); result.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableAddPropertyNotification END (OK)"); }