[Test]
[Category("P1")]
+ [Description("Test ItemAlignment. Check whether ItemAlignment is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.ItemAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jiyun Yang, ji.yang@samsung.com")]
+ public void ItemAlignment_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ var button = new Components.Button();
+ Assert.IsNotNull(button, "Should be not null");
+ Assert.IsInstanceOf<Components.Button>(button, "Should be equal!");
+
+ // Test Alignment.Begin
+ button.ItemAlignment = LinearLayout.Alignment.Begin;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.Begin, "Should be equal");
+
+ // Test Alignment.End
+ button.ItemAlignment = LinearLayout.Alignment.End;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.End, "Should be equal");
+
+ // Test Alignment.CenterHorizontal
+ button.ItemAlignment = LinearLayout.Alignment.CenterHorizontal;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.CenterHorizontal, "Should be equal");
+
+ // Test Alignment.Top
+ button.ItemAlignment = LinearLayout.Alignment.Top;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.Top, "Should be equal");
+
+ // Test Alignment.Bottom
+ button.ItemAlignment = LinearLayout.Alignment.Bottom;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.Bottom, "Should be equal");
+
+ // Test Alignment.CenterVertical
+ button.ItemAlignment = LinearLayout.Alignment.CenterVertical;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.CenterVertical, "Should be equal");
+
+ // Test Alignment.Center
+ button.ItemAlignment = LinearLayout.Alignment.Center;
+ Assert.AreEqual(button.ItemAlignment, LinearLayout.Alignment.Center, "Should be equal");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ItemSpacing. Check whether ItemSpacing is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.ItemSpacing A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jiyun Yang, ji.yang@samsung.com")]
+ public void ItemSpacing_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ var button = new Components.Button();
+ Assert.IsNotNull(button, "Should be not null");
+ Assert.IsInstanceOf<Components.Button>(button, "Should be equal");
+
+ var value = new Size2D(10, 10);
+ button.ItemSpacing = value;
+
+ Assert.IsInstanceOf<Size2D>(button.ItemSpacing, "Should be equal");
+ Assert.AreEqual(button.ItemSpacing.Width, value.Width, "Should be equal");
+ Assert.AreEqual(button.ItemSpacing.Height, value.Height, "Should be equal");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Test OnKey. Check return the right value or not")]
[Property("SPEC", "Tizen.NUI.Components.Button.OnKey M")]
[Property("SPEC_URL", "-")]
\r
[Test]\r
[Category("P1")]\r
+ [Description("Test MakeToast. Check whether MakeToast works or not.")]\r
+ [Property("SPEC", "Tizen.NUI.Components.Notification.MakeToast M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "Jiyun Yang, ji.yang@samsung.com")]\r
+ public void MakeToast_CHECK_RETURN_VALUE()\r
+ {\r
+ /* TEST CODE */\r
+ var toast = Notification.MakeToast("Toast text", Notification.ToastBottom);\r
+ Assert.IsNotNull(toast, "Can't create success object Notification.");\r
+ Assert.IsInstanceOf<Notification>(toast, "Should be an instance of Notification type");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P2")]\r
+ [Description("Test SetLevel. Check illegal arguments.")]\r
+ [Property("SPEC", "Tizen.NUI.Components.Notification.MakeToast M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MEX")]\r
+ [Property("AUTHOR", "Jiyun Yang, ji.yang@samsung.com")]\r
+ public void MakeToast_ARGUMENT_NULL_EXCEPTION_WITH_TEXT()\r
+ {\r
+ /* TEST CODE */\r
+ try\r
+ {\r
+ var toast = Notification.MakeToast(null, Notification.ToastBottom);\r
+ Assert.Fail("Should throw an exception: Input text should not be null.");\r
+ }\r
+ catch (ArgumentNullException)\r
+ {\r
+ Assert.Pass("ArgumentNullException: passed!");\r
+ }\r
+ }\r
+\r
+ [Test]\r
+ [Category("P2")]\r
+ [Description("Test SetLevel. Check illegal arguments.")]\r
+ [Property("SPEC", "Tizen.NUI.Components.Notification.MakeToast M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MEX")]\r
+ [Property("AUTHOR", "Jiyun Yang, ji.yang@samsung.com")]\r
+ public void MakeToast_ARGUMENT_NULL_EXCEPTION_WITH_GRAVITY()\r
+ {\r
+ /* TEST CODE */\r
+ try\r
+ {\r
+ var toast = Notification.MakeToast("Toast text", null);\r
+ Assert.Fail("Should throw an exception: Input gravity should not be null.");\r
+ }\r
+ catch (ArgumentNullException)\r
+ {\r
+ Assert.Pass("ArgumentNullException: passed!");\r
+ }\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
[Description("Test Post. Check whether Post works or not.")]\r
[Property("SPEC", "Tizen.NUI.Components.Notification.Post M")]\r
[Property("SPEC_URL", "-")]\r