Assert.Fail("Caught Exception" + e.ToString());
}
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ScrollPosition. Check whether ScrollPosition returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ScrollPosition_CHECK_GET_VALUE()
+ {
+ /* TEST CODE */
+ var scrollableBase = new ScrollableBase();
+ Assert.IsNotNull(scrollableBase, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableBase>(scrollableBase, "Should return ScrollableBase instance.");
+ scrollableBase.Size = new Size(100, 100);
+ var contentContainer = scrollableBase.ContentContainer;
+ contentContainer.Position = new Position(50, 50);
+ Assert.AreEqual(-scrollableBase.ContentContainer.Position.X, scrollableBase.ScrollPosition.X, "Should be equals to the value of -ContentContainer.Position.X");
+ Assert.AreEqual(-scrollableBase.ContentContainer.Position.Y, scrollableBase.ScrollPosition.Y, "Should be equals to the value of -ContentContainer.Position.Y");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ScrollCurrentPosition. Check whether ScrollCurrentPosition returns the value expected.")]
+ [Property("SPEC", "Tizen.NUI.Components.ScrollableBase.ScrollCurrentPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ScrollCurrentPosition_CHECK_GET_VALUE()
+ {
+ /* TEST CODE */
+ var scrollableBase = new ScrollableBase();
+ Assert.IsNotNull(scrollableBase, "Should be not null!");
+ Assert.IsInstanceOf<ScrollableBase>(scrollableBase, "Should return ScrollableBase instance.");
+ scrollableBase.Size = new Size(100, 100);
+ var contentContainer = scrollableBase.ContentContainer;
+ contentContainer.Position = new Position(50, 50);
+ Assert.AreEqual(-scrollableBase.ContentContainer.CurrentPosition.X, scrollableBase.ScrollCurrentPosition.X, "Should be equals to the value of -ContentContainer.CurrentPosition.X");
+ Assert.AreEqual(-scrollableBase.ContentContainer.CurrentPosition.Y, scrollableBase.ScrollCurrentPosition.Y, "Should be equals to the value of -ContentContainer.CurrnetPosition.Y");
+ }
}
}