using Tizen.NUI.Components;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
-using Tizen.NUI.Components.Test;\r
-\r
-namespace Tizen.NUI.Components.Tests\r
-{\r
- [TestFixture]\r
- [Description("Tizen.NUI.Components.Button Tests")]\r
- public class ButtonTests\r
- {\r
- private const string TAG = "Components";\r
- private bool _stateChangedEvent = false;\r
- private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";\r
- private static bool _focusGainedFlag = false;\r
- private static bool _focusLostFlag = false;\r
- private static bool _updateFlag = false;\r
- private static bool _themeFlag = false;\r
- private static bool _measureTextFlag = false;\r
- private static bool _layoutChildFlag = false;\r
-\r
- [SetUp]\r
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.Button Tests")]
+ public class ButtonTests
+ {
+ private const string TAG = "Components";
+ private bool _stateChangedEvent = false;
+ private string _image_path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
+ private static bool _focusGainedFlag = false;
+ private static bool _focusLostFlag = false;
+ private static bool _updateFlag = false;
+ private static bool _themeFlag = false;
+ private static bool _measureTextFlag = false;
+ private static bool _layoutChildFlag = false;
+
+ [SetUp]
public void Init()
{
_stateChangedEvent = false;
App.MainTitleChangeText("CommonButtonTests");
App.MainTitleChangeBackgroundColor(null);
- }\r
-\r
+ }
+
[TearDown]
public void Destroy()
{
Tizen.Log.Info(TAG, "Destroy() is called!");
- }\r
-\r
+ }
+
[Test]
[Category("P1")]
[Description("Test Button empty constructor. Check it has been triggered")]
/* TEST CODE */
var button = new Components.Button();
Assert.IsNotNull(button, "Should be not null");
- Assert.IsInstanceOf<Components.Button>(button, "Should be equal!");\r
-\r
- }\r
-\r
+ Assert.IsInstanceOf<Components.Button>(button, "Should be equal!");
+
+ }
+
[Test]
[Category("P1")]
- [Description("Test IsSelectable. Check whether IsSelectable is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IsSelectable A")]\r
- [Property("SPEC_URL", "-")]\r
+ [Description("Test IsSelectable. Check whether IsSelectable is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IsSelectable A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IsSelectable_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IsSelectable_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!");
- button.IsSelectable = true;\r
- Assert.AreEqual(true, button.IsSelectable, "Should be equals to the set value");\r
- button.IsSelectable = false;\r
- Assert.AreEqual(false, button.IsSelectable, "Should be equals to the set value");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test Text. Check whether Text is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.Text A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IsSelectable = true;
+ Assert.AreEqual(true, button.IsSelectable, "Should be equals to the set value");
+ button.IsSelectable = false;
+ Assert.AreEqual(false, button.IsSelectable, "Should be equals to the set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Text. Check whether Text is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.Text A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void Text_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void Text_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!");
- button.Text = "Test Text";\r
- Assert.AreEqual("Test Text", button.Text, "Should be equals to the set value of Text");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TranslatableText. Check whether TranslatableText is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TranslatableText A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.Text = "Test Text";
+ Assert.AreEqual("Test Text", button.Text, "Should be equals to the set value of Text");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TranslatableText. Check whether TranslatableText is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TranslatableText A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TranslatableText_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TranslatableText_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!");
- button.TranslatableText = "Test TranslatableText";\r
- Assert.AreEqual("Test TranslatableText", button.TranslatableText, "Should be equals to the set value of TranslatableText");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test PointSize. Check whether PointSize is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.PointSize A")]\r
- [Property("SPEC_URL", "-")]\r
+ if (NUIApplication.MultilingualResourceManager != null)
+ {
+ button.TranslatableText = "Test TranslatableText";
+ Assert.AreEqual("Test TranslatableText", button.TranslatableText, "Should be equals to the set value of TranslatableText");
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PointSize. Check whether PointSize is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.PointSize A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void PointSize_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void PointSize_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!");
- button.PointSize = 10.0f;\r
- Assert.AreEqual(10.0f, button.PointSize, "Should be equals to the set value of PointSize");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test FontFamily. Check whether FontFamily is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.FontFamily A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.PointSize = 10.0f;
+ Assert.AreEqual(10.0f, button.PointSize, "Should be equals to the set value of PointSize");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test FontFamily. Check whether FontFamily is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.FontFamily A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void FontFamily_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void FontFamily_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!");
- button.FontFamily = "SamsungOne 500";\r
- Assert.AreEqual("SamsungOne 500", button.FontFamily, "Should be equals to the set value of FontFamily");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TextColor. Check whether TextColor is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TextColor A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.FontFamily = "SamsungOne 500";
+ Assert.AreEqual("SamsungOne 500", button.FontFamily, "Should be equals to the set value of FontFamily");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TextColor. Check whether TextColor is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TextColor A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TextColor_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TextColor_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 color = new Color(1.0f, 0.0f, 0.0f, 1.0f);\r
+ var color = new Color(1.0f, 0.0f, 0.0f, 1.0f);
Assert.IsNotNull(color, "Should be not null");
Assert.IsInstanceOf<Color>(color, "Should be equal!");
- button.TextColor = color;\r
-\r
+ button.TextColor = color;
+
Assert.AreEqual(color.R, button.TextColor.R, "Should be equals to the color.R set");
Assert.AreEqual(color.G, button.TextColor.G, "Should be equals to the color.G set");
Assert.AreEqual(color.B, button.TextColor.B, "Should be equals to the color.B set");
- Assert.AreEqual(color.A, button.TextColor.A, "Should be equals to the color.A set");\r
-\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TextAlignment. Check whether TextAlignment is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TextAlignment A")]\r
- [Property("SPEC_URL", "-")]\r
+ Assert.AreEqual(color.A, button.TextColor.A, "Should be equals to the color.A set");
+
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TextAlignment. Check whether TextAlignment is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TextAlignment A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TextAlignment_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TextAlignment_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!");
- button.TextAlignment = HorizontalAlignment.Begin;\r
- Assert.AreEqual(HorizontalAlignment.Begin, button.TextAlignment, "Should be equals to the set value of TextAlignment");\r
+ button.TextAlignment = HorizontalAlignment.Begin;
+ Assert.AreEqual(HorizontalAlignment.Begin, button.TextAlignment, "Should be equals to the set value of TextAlignment");
button.TextAlignment = HorizontalAlignment.Center;
Assert.AreEqual(HorizontalAlignment.Center, button.TextAlignment, "Should be equals to the set value of TextAlignment");
button.TextAlignment = HorizontalAlignment.End;
Assert.AreEqual(HorizontalAlignment.End, button.TextAlignment, "Should be equals to the set value of TextAlignment");
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test IconURL. Check whether IconURL is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IconURL A")]\r
- [Property("SPEC_URL", "-")]\r
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test IconURL. Check whether IconURL is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IconURL A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IconURL_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IconURL_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!");
- button.IconURL = _image_path;\r
- Assert.AreEqual(_image_path, button.IconURL, "Should be equals to the set value of IconURL");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TextSelector. Check whether TextSelector is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TextSelector A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IconURL = _image_path;
+ Assert.AreEqual(_image_path, button.IconURL, "Should be equals to the set value of IconURL");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TextSelector. Check whether TextSelector is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TextSelector A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TextSelector_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TextSelector_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 stringSelector = new StringSelector\r
- {\r
- Normal = "Normal",\r
- Selected = "Selected",\r
- };\r
+ var stringSelector = new StringSelector
+ {
+ Normal = "Normal",
+ Selected = "Selected",
+ };
Assert.IsNotNull(stringSelector, "Should be not null");
Assert.IsInstanceOf<StringSelector>(stringSelector, "Should be equal!");
-\r
- button.TextSelector = stringSelector;\r
- Assert.AreEqual(stringSelector.Normal, button.TextSelector.Normal, "Should be equals to the set value of TextSelector");\r
- Assert.AreEqual(stringSelector.Selected, button.TextSelector.Selected, "Should be equals to the set value of TextSelector");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TranslatableTextSelector. Check whether TranslatableTextSelector is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TranslatableTextSelector A")]\r
- [Property("SPEC_URL", "-")]\r
+
+ button.TextSelector = stringSelector;
+ Assert.AreEqual(stringSelector.Normal, button.TextSelector.Normal, "Should be equals to the set value of TextSelector");
+ Assert.AreEqual(stringSelector.Selected, button.TextSelector.Selected, "Should be equals to the set value of TextSelector");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TranslatableTextSelector. Check whether TranslatableTextSelector is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TranslatableTextSelector A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TranslatableTextSelector_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TranslatableTextSelector_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 stringSelector = new StringSelector\r
- {\r
- Normal = "Normal",\r
- Selected = "Selected",\r
- };\r
+ var stringSelector = new StringSelector
+ {
+ Normal = "Normal",
+ Selected = "Selected",
+ };
Assert.IsNotNull(stringSelector, "Should be not null");
Assert.IsInstanceOf<StringSelector>(stringSelector, "Should be equal!");
-\r
- button.TranslatableTextSelector = stringSelector;\r
- Assert.AreEqual(stringSelector.Normal, button.TranslatableTextSelector.Normal, "Should be equals to the set value of TranslatableTextSelector");\r
- Assert.AreEqual(stringSelector.Selected, button.TranslatableTextSelector.Selected, "Should be equals to the set value of TranslatableTextSelector");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TextColorSelector. Check whether TextColorSelector is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TextColorSelector A")]\r
- [Property("SPEC_URL", "-")]\r
+
+ button.TranslatableTextSelector = stringSelector;
+ Assert.AreEqual(stringSelector.Normal, button.TranslatableTextSelector.Normal, "Should be equals to the set value of TranslatableTextSelector");
+ Assert.AreEqual(stringSelector.Selected, button.TranslatableTextSelector.Selected, "Should be equals to the set value of TranslatableTextSelector");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TextColorSelector. Check whether TextColorSelector is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TextColorSelector A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TextColorSelector_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TextColorSelector_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 colorSelector = new ColorSelector\r
- {\r
- Normal = new Color(0.0f, 0.0f, 1.0f, 1.0f),\r
- Selected = new Color(0.0f, 1.0f, 0.0f, 1.0f),\r
- };\r
+ var colorSelector = new ColorSelector
+ {
+ Normal = new Color(0.0f, 0.0f, 1.0f, 1.0f),
+ Selected = new Color(0.0f, 1.0f, 0.0f, 1.0f),
+ };
Assert.IsNotNull(colorSelector, "Should be not null");
Assert.IsInstanceOf<ColorSelector>(colorSelector, "Should be equal!");
-\r
- button.TextColorSelector = colorSelector;\r
- Assert.AreEqual(colorSelector.Normal.R, button.TextColorSelector.Normal.R, "Should be equals to the set value of TextColorSelector Normal R");\r
- Assert.AreEqual(colorSelector.Normal.G, button.TextColorSelector.Normal.G, "Should be equals to the set value of TextColorSelector Normal G");\r
- Assert.AreEqual(colorSelector.Normal.B, button.TextColorSelector.Normal.B, "Should be equals to the set value of TextColorSelector Normal B");\r
- Assert.AreEqual(colorSelector.Normal.A, button.TextColorSelector.Normal.A, "Should be equals to the set value of TextColorSelector Normal A");\r
-\r
- Assert.AreEqual(colorSelector.Selected.R, button.TextColorSelector.Selected.R, "Should be equals to the set value of TextColorSelector Selected R");\r
- Assert.AreEqual(colorSelector.Selected.G, button.TextColorSelector.Selected.G, "Should be equals to the set value of TextColorSelector Selected G");\r
- Assert.AreEqual(colorSelector.Selected.B, button.TextColorSelector.Selected.B, "Should be equals to the set value of TextColorSelector Selected B");\r
- Assert.AreEqual(colorSelector.Selected.A, button.TextColorSelector.Selected.A, "Should be equals to the set value of TextColorSelector Selected A");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test PointSizeSelector. Check whether PointSizeSelector is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.PointSizeSelector A")]\r
- [Property("SPEC_URL", "-")]\r
+
+ button.TextColorSelector = colorSelector;
+ Assert.AreEqual(colorSelector.Normal.R, button.TextColorSelector.Normal.R, "Should be equals to the set value of TextColorSelector Normal R");
+ Assert.AreEqual(colorSelector.Normal.G, button.TextColorSelector.Normal.G, "Should be equals to the set value of TextColorSelector Normal G");
+ Assert.AreEqual(colorSelector.Normal.B, button.TextColorSelector.Normal.B, "Should be equals to the set value of TextColorSelector Normal B");
+ Assert.AreEqual(colorSelector.Normal.A, button.TextColorSelector.Normal.A, "Should be equals to the set value of TextColorSelector Normal A");
+
+ Assert.AreEqual(colorSelector.Selected.R, button.TextColorSelector.Selected.R, "Should be equals to the set value of TextColorSelector Selected R");
+ Assert.AreEqual(colorSelector.Selected.G, button.TextColorSelector.Selected.G, "Should be equals to the set value of TextColorSelector Selected G");
+ Assert.AreEqual(colorSelector.Selected.B, button.TextColorSelector.Selected.B, "Should be equals to the set value of TextColorSelector Selected B");
+ Assert.AreEqual(colorSelector.Selected.A, button.TextColorSelector.Selected.A, "Should be equals to the set value of TextColorSelector Selected A");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PointSizeSelector. Check whether PointSizeSelector is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.PointSizeSelector A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void PointSizeSelector_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void PointSizeSelector_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 floatSelector = new FloatSelector\r
- {\r
- Normal = 10.0f,\r
- Selected = 12.0f,\r
- };\r
+ var floatSelector = new FloatSelector
+ {
+ Normal = 10.0f,
+ Selected = 12.0f,
+ };
Assert.IsNotNull(floatSelector, "Should be not null");
Assert.IsInstanceOf<FloatSelector>(floatSelector, "Should be equal!");
-\r
- button.PointSizeSelector = floatSelector;\r
- Assert.AreEqual(floatSelector.Normal, button.PointSizeSelector.Normal, "Should be equals to the set value of PointSizeSelector Normal");\r
- Assert.AreEqual(floatSelector.Selected, button.PointSizeSelector.Selected, "Should be equals to the set value of PointSizeSelector Selected");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test IconURLSelector. Check whether IconURLSelector is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IconURLSelector A")]\r
- [Property("SPEC_URL", "-")]\r
+
+ button.PointSizeSelector = floatSelector;
+ Assert.AreEqual(floatSelector.Normal, button.PointSizeSelector.Normal, "Should be equals to the set value of PointSizeSelector Normal");
+ Assert.AreEqual(floatSelector.Selected, button.PointSizeSelector.Selected, "Should be equals to the set value of PointSizeSelector Selected");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test IconURLSelector. Check whether IconURLSelector is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IconURLSelector A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IconURLSelector_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IconURLSelector_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 stringSelector = new StringSelector\r
- {\r
- Normal = _image_path,\r
- Selected = _image_path,\r
- };\r
+ var stringSelector = new StringSelector
+ {
+ Normal = _image_path,
+ Selected = _image_path,
+ };
Assert.IsNotNull(stringSelector, "Should be not null");
Assert.IsInstanceOf<StringSelector>(stringSelector, "Should be equal!");
- button.IconURLSelector = stringSelector;\r
- Assert.AreEqual(stringSelector.Normal, button.IconURLSelector.Normal, "Should be equals to the set value of IconURLSelector Normal");\r
- Assert.AreEqual(stringSelector.Selected, button.IconURLSelector.Selected, "Should be equals to the set value of IconURLSelector Selected");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test IsSelected. Check whether IsSelected is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IsSelected A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IconURLSelector = stringSelector;
+ Assert.AreEqual(stringSelector.Normal, button.IconURLSelector.Normal, "Should be equals to the set value of IconURLSelector Normal");
+ Assert.AreEqual(stringSelector.Selected, button.IconURLSelector.Selected, "Should be equals to the set value of IconURLSelector Selected");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test IsSelected. Check whether IsSelected is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IsSelected A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IsSelected_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IsSelected_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!");
- button.IsSelected = true;\r
- Assert.AreEqual(true, button.IsSelected, "Retrieved IsSelected should be equal to set value");\r
- button.IsSelected = false;\r
- Assert.AreEqual(false, button.IsSelected, "Retrieved IsSelected should be equal to set value");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test IsEnabled. Check whether IsEnabled is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IsEnabled A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IsSelected = true;
+ Assert.AreEqual(true, button.IsSelected, "Retrieved IsSelected should be equal to set value");
+ button.IsSelected = false;
+ Assert.AreEqual(false, button.IsSelected, "Retrieved IsSelected should be equal to set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test IsEnabled. Check whether IsEnabled is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IsEnabled A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IsEnabled_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IsEnabled_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!");
- button.IsEnabled = true;\r
- Assert.AreEqual(true, button.IsEnabled, "Retrieved IsEnabled should be equal to set value");\r
- button.IsEnabled = false;\r
- Assert.AreEqual(false, button.IsEnabled, "Retrieved IsEnabled should be equal to set value");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test IconPadding. Check whether IconPadding is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.IconPadding A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IsEnabled = true;
+ Assert.AreEqual(true, button.IsEnabled, "Retrieved IsEnabled should be equal to set value");
+ button.IsEnabled = false;
+ Assert.AreEqual(false, button.IsEnabled, "Retrieved IsEnabled should be equal to set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test IconPadding. Check whether IconPadding is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.IconPadding A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void IconPadding_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void IconPadding_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!");
- button.IconPadding = new Extents(0, 0, 10, 10);\r
- Assert.AreEqual(0, button.IconPadding.Start, "Retrieved IconPadding.Start should be equal to set value");\r
- Assert.AreEqual(0, button.IconPadding.End, "Retrieved IconPadding.End should be equal to set value");\r
- Assert.AreEqual(10, button.IconPadding.Top, "Retrieved IconPadding.Top should be equal to set value");\r
- Assert.AreEqual(10, button.IconPadding.Bottom, "Retrieved IconPadding.Bottom should be equal to set value");\r
- }\r
-\r
- [Test]\r
- [Category("P1")]\r
- [Description("Test TextPadding. Check whether TextPadding is readable and writable.")]\r
- [Property("SPEC", "Tizen.NUI.Components.Button.TextPadding A")]\r
- [Property("SPEC_URL", "-")]\r
+ button.IconPadding = new Extents(0, 0, 10, 10);
+ Assert.AreEqual(0, button.IconPadding.Start, "Retrieved IconPadding.Start should be equal to set value");
+ Assert.AreEqual(0, button.IconPadding.End, "Retrieved IconPadding.End should be equal to set value");
+ Assert.AreEqual(10, button.IconPadding.Top, "Retrieved IconPadding.Top should be equal to set value");
+ Assert.AreEqual(10, button.IconPadding.Bottom, "Retrieved IconPadding.Bottom should be equal to set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TextPadding. Check whether TextPadding is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Button.TextPadding A")]
+ [Property("SPEC_URL", "-")]
[Property("CRITERIA", "PRW")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void TextPadding_SET_GET_VALUE()\r
- {\r
- /* TEST CODE */\r
- var button = new Components.Button();\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void TextPadding_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!");
- button.TextPadding = new Extents(0, 0, 10, 10);\r
- Assert.AreEqual(0, button.TextPadding.Start, "Retrieved TextPadding.Start should be equal to set value");\r
- Assert.AreEqual(0, button.TextPadding.End, "Retrieved TextPadding.End should be equal to set value");\r
- Assert.AreEqual(10, button.TextPadding.Top, "Retrieved TextPadding.Top should be equal to set value");\r
- Assert.AreEqual(10, button.TextPadding.Bottom, "Retrieved TextPadding.Bottom should be equal to set value");\r
- }\r
-\r
+ button.TextPadding = new Extents(0, 0, 10, 10);
+ Assert.AreEqual(0, button.TextPadding.Start, "Retrieved TextPadding.Start should be equal to set value");
+ Assert.AreEqual(0, button.TextPadding.End, "Retrieved TextPadding.End should be equal to set value");
+ Assert.AreEqual(10, button.TextPadding.Top, "Retrieved TextPadding.Top should be equal to set value");
+ Assert.AreEqual(10, button.TextPadding.Bottom, "Retrieved TextPadding.Bottom should be equal to set value");
+ }
+
[Test]
[Category("P1")]
[Description("Test OnKey. Check return the right value or not")]
[Property("SPEC", "Tizen.NUI.Components.Button.OnKey M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
- [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]\r
- public void OnKey_CHECK_RETURN_VALUE()\r
- {\r
- /* TEST CODE */\r
+ [Property("AUTHOR", "Ma Junqing, junqing.ma@samsung.com")]
+ public void OnKey_CHECK_RETURN_VALUE()
+ {
+ /* TEST CODE */
try
{
var button = new Components.Button();
Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
Assert.Fail("Caught Exception" + e.ToString());
- }\r
- }\r
-\r
+ }
+ }
+
[Test]
[Category("P1")]
[Description("Test StateChangedEvent. Check it has been triggered")]
button.StateChangedEvent += OnStateChangedEvent;
button.IsSelected = true;
- Assert.AreEqual(true, _stateChangedEvent, "Should be equal!");\r
- button.StateChangedEvent -= OnStateChangedEvent;\r
- }\r
-\r
+ Assert.AreEqual(true, _stateChangedEvent, "Should be equal!");
+ button.StateChangedEvent -= OnStateChangedEvent;
+ }
+
[Test]
[Category("P1")]
[Description("Test Dispose, try to dispose the Button.")]
Assert.Fail("Caught Exception" + e.ToString());
}
}
-\r
- private void OnStateChangedEvent(object sender, Components.Button.StateChangedEventArgs args)\r
- {\r
- _stateChangedEvent = true;\r
- }\r
-\r
- }\r
-}\r
+
+ private void OnStateChangedEvent(object sender, Components.Button.StateChangedEventArgs args)
+ {
+ _stateChangedEvent = true;
+ }
+
+ }
+}