public void PropertyConstructor() { tlog.Debug(tag, $"PropertyConstructor START"); var animatable = new Animatable(); Assert.IsNotNull(animatable, "Should be not null!"); Assert.IsInstanceOf <Animatable>(animatable, "Should return PropertyValue instance."); var dummyIndex = 28000000; var testingTarget = new Property(animatable, dummyIndex); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <Property>(testingTarget, "Should return PropertyValue instance."); tlog.Debug(tag, "InvalidKey : " + Property.InvalidKey); tlog.Debug(tag, "InvalidComponentIndex : " + Property.InvalidComponentIndex); using (Animatable ani = new Animatable()) { testingTarget.Object = ani; tlog.Debug(tag, "Object : " + testingTarget.Object); } testingTarget.Dispose(); animatable.Dispose(); tlog.Debug(tag, $"PropertyConstructor END (OK)"); }
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 AnimatableConstructor() { tlog.Debug(tag, $"AnimatableConstructor START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of Animatable class!"); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableConstructor END (OK)"); }
public void AnimatableGetPropertyCount() { tlog.Debug(tag, $"AnimatableGetPropertyCount START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of Animatable class!"); tlog.Debug(tag, "PropertyCount : " + testingTarget.GetPropertyCount()); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableGetPropertyCount END (OK)"); }
public void PropertyConstructorWithPropertyName() { tlog.Debug(tag, $"PropertyConstructorWithPropertyName START"); var animatable = new Animatable(); Assert.IsNotNull(animatable, "Should be not null!"); Assert.IsInstanceOf <Animatable>(animatable, "Should return PropertyValue instance."); var testingTarget = new Property(animatable, "image"); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <Property>(testingTarget, "Should return PropertyValue instance."); testingTarget.Dispose(); animatable.Dispose(); tlog.Debug(tag, $"PropertyConstructorWithPropertyName END (OK)"); }
public void AnimatableGetPropertyName() { tlog.Debug(tag, $"AnimatableGetPropertyName START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of ImageView class!"); testingTarget.RegisterProperty("dummy", new PropertyValue(6)); var index = testingTarget.GetPropertyIndex("dummy"); var result = testingTarget.GetPropertyName(index); Assert.AreEqual("dummy", result, "should be equal."); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableGetPropertyName END (OK)"); }
public void AnimatableRegisterPropertyWithAccessMode() { tlog.Debug(tag, $"AnimatableRegisterPropertyWithAccessMode START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of ImageView class!"); testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable); var index = testingTarget.GetPropertyIndex("dummy"); testingTarget.GetProperty(index).Get(out int result); Assert.AreEqual(6, result, "should be equal."); testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableRegisterPropertyWithAccessMode END (OK)"); }
public void PropertyConstructorWithSubComponentIndex() { tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex START"); var animatable = new Animatable(); Assert.IsNotNull(animatable, "Should be not null!"); Assert.IsInstanceOf <Animatable>(animatable, "Should return PropertyValue instance."); var dummyIndex = 28000000; var testingTarget = new Property(animatable, dummyIndex, -1); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <Property>(testingTarget, "Should return PropertyValue instance."); testingTarget.Dispose(); animatable.Dispose(); tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex 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)"); }
public void AnimatablePropertyComponentRegistrationConstructor() { tlog.Debug(tag, $"AnimatablePropertyComponentRegistrationConstructor START"); var ani = new Animatable(); Assert.IsNotNull(ani, "should be not null"); Assert.IsInstanceOf <Animatable>(ani, "should be an instance of Animatable class!"); var registered = new TypeRegistration((global::System.IntPtr)ani.SwigCPtr, false); var testingTarget = new AnimatablePropertyComponentRegistration(registered, "Animatable", 28000000, 28000000, (uint)28000000); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <AnimatablePropertyComponentRegistration>(testingTarget, "should be an instance of testing target class!"); testingTarget.Dispose(); registered.Dispose(); ani.Dispose(); tlog.Debug(tag, $"AnimatablePropertyComponentRegistrationConstructor END (OK)"); }
public void PropertyComponentIndexGet() { tlog.Debug(tag, $"PropertyComponentIndexGet START"); var animatable = new Animatable(); Assert.IsNotNull(animatable, "Should be not null!"); Assert.IsInstanceOf <Animatable>(animatable, "Should return PropertyValue instance."); var testingTarget = new Property(animatable, 28000000, -1); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <Property>(testingTarget, "Should return PropertyValue instance."); var result = testingTarget.componentIndex; Assert.IsTrue(-1 == result); testingTarget.Dispose(); animatable.Dispose(); tlog.Debug(tag, $"PropertyComponentIndexGet END (OK)"); }
public void AnimatableRemoveConstraints() { tlog.Debug(tag, $"AnimatableRemoveConstraints START"); var testingTarget = new Animatable(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <Animatable>(testingTarget, "should be an instance of Animatable class!"); try { testingTarget.RemoveConstraints(); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"AnimatableRemoveConstraints END (OK)"); }