--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.AlertDialog Tests")]
+ public class AlertDialogTests
+ {
+ private const string TAG = "Components";
+
+ public AlertDialogTests()
+ {
+ }
+
+ ~AlertDialogTests()
+ {
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a AlertDialog object. Check whether AlertDialog is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AlertDialog C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void AlertDialog_INIT()
+ {
+ /* TEST CODE */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test AlertDialog constructor using style. Check whether AlertDialog is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AlertDialog C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "string")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void AlertDialog_INIT_WITH_STRING()
+ {
+ /* PRECONDITION */
+ StyleManager.Instance.Theme = "default";
+ StyleManager.Instance.RegisterStyle("defaultAlertDialog", "default", typeof(DefaultAlertDialogStyle));
+ /* TEST CODE */
+ var dialog = new AlertDialog("defaultAlertDialog");
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog with style Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test AlertDialog constructor using style. Check whether AlertDialog is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.AlertDialog C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "AlertDialogStyle")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void AlertDialog_INIT_WITH_STYLE()
+ {
+ /* PRECONDITION */
+ var style = new AlertDialogStyle();
+ Assert.IsNotNull(style, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style, "Costruct AlertDialogStyle Fail");
+
+ /* TEST CODE */
+ var dialog = new AlertDialog(style);
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog with style Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Title. Check whether Title is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Title A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Title_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+
+ /* TEST CODE */
+ string title = "title";
+ dialog.Title = title;
+ Assert.AreSame(title, dialog.Title, "Retrieved Title should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Message. Check whether Message is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Message A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Message_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+
+ /* TEST CODE */
+ string message = "message";
+ dialog.Message = message;
+ Assert.AreSame(message, dialog.Message, "Retrieved Message should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Actions. Check whether Actions is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Actions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Actions_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Construct AlertDialog Fail");
+
+ /* TEST CODE */
+ View[] actions = new View[] { new View(), new View() };
+ dialog.Actions = actions;
+
+ int i = 0;
+ foreach (var action in dialog.Actions)
+ {
+ Assert.AreSame(actions[i], action, "Retrieved Actions should be the same with the set value.");
+ i++;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TitleContent. Check whether TitleContent is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.TitleContent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void TitleContent_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+
+ /* TEST CODE */
+ var view = new View();
+ Assert.IsNotNull(view, "Can't create success object View");
+ Assert.IsInstanceOf<View>(view, "Construct View Fail");
+
+ dialog.TitleContent = view;
+ Assert.AreSame(view, dialog.TitleContent, "Retrieved TitleContent should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Content. Check whether Content is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.Content A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Content_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+
+ /* TEST CODE */
+ var view = new View();
+ Assert.IsNotNull(view, "Can't create success object View");
+ Assert.IsInstanceOf<View>(view, "Construct View Fail");
+
+ dialog.Content = view;
+ Assert.AreSame(view, dialog.Content, "Retrieved Content should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ActionContent. Check whether ActionContent is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.ActionContent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ActionContent_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new AlertDialog();
+ Assert.IsNotNull(dialog, "Can't create success object AlertDialog");
+ Assert.IsInstanceOf<AlertDialog>(dialog, "Costruct AlertDialog Fail");
+
+ /* TEST CODE */
+ var view = new View();
+ Assert.IsNotNull(view, "Can't create success object View");
+ Assert.IsInstanceOf<View>(view, "Construct View Fail");
+
+ dialog.ActionContent = view;
+ Assert.AreSame(view, dialog.ActionContent, "Retrieved ActionContent should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ApplyStyle. Check whether ApplyStyle works or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialog.ApplyStyle M")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ApplyStyle_CHECK()
+ {
+ try
+ {
+ var dialog = new AlertDialog();
+ var style = new AlertDialogStyle();
+ dialog.ApplyStyle(style);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ public class DefaultAlertDialogStyle : StyleBase
+ {
+ protected override ViewStyle GetViewStyle()
+ {
+ return new AlertDialogStyle();
+ }
+ }
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.AlertDialogStyle Tests")]
+ public class AlertDialogStyleTests
+ {
+ private const string TAG = "Components";
+
+ public AlertDialogStyleTests()
+ {
+ }
+
+ ~AlertDialogStyleTests()
+ {
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a AlertDialogStyle object. Check whether AlertDialogStyle is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.AlertDialogStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void AlertDialogStyle_INIT()
+ {
+ /* TEST CODE */
+ var style = new AlertDialogStyle();
+ Assert.IsNotNull(style, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style, "Costruct AlertDialogStyle Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test AlertDialogStyle constructor using style. Check whether AlertDialogStyle is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.AlertDialogStyle C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "AlertDialogStyle")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void AlertDialogStyle_INIT_WITH_STYLE()
+ {
+ /* PRECONDITION */
+ var style1 = new AlertDialogStyle();
+ Assert.IsNotNull(style1, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style1, "Costruct AlertDialogStyle Fail");
+
+ /* TEST CODE */
+ var style2 = new AlertDialogStyle(style1);
+ Assert.IsNotNull(style2, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style2, "Costruct AlertDialogStyle with style Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test TitleTextLabel. Check whether TitleTextLabel is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.TitleTextLabel A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void TitleTextLabel_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var style = new AlertDialogStyle();
+ Assert.IsNotNull(style, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style, "Construct AlertDialogStyle Fail");
+
+ /* TEST CODE */
+ var titleTextLabel = new TextLabelStyle();
+ style.TitleTextLabel = titleTextLabel;
+ Assert.AreSame(titleTextLabel, style.TitleTextLabel, "Retrieved TitleTextLabel should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test MessageTextLabel. Check whether MessageTextLabel is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.MessageTextLabel A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void MessageTextLabel_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var style = new AlertDialogStyle();
+ Assert.IsNotNull(style, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style, "Construct AlertDialogStyle Fail");
+
+ /* TEST CODE */
+ var messageTextLabel = new TextLabelStyle();
+ style.MessageTextLabel = messageTextLabel;
+ Assert.AreSame(messageTextLabel, style.MessageTextLabel, "Retrieved MessageTextLabel should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ActionContent. Check whether ActionContent is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.ActionContent A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ActionContent_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var style = new AlertDialogStyle();
+ Assert.IsNotNull(style, "Can't create success object AlertDialogStyle");
+ Assert.IsInstanceOf<AlertDialogStyle>(style, "Construct AlertDialogStyle Fail");
+
+ /* TEST CODE */
+ var actionContent = new ViewStyle();
+ style.ActionContent = actionContent;
+ Assert.AreSame(actionContent, style.ActionContent, "Retrieved ActionContent should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test CopyFrom. Check whether CopyFrom works or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.AlertDialogStyle.CopyFrom M")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void CopyFrom_CHECK()
+ {
+ try
+ {
+ var style1 = new AlertDialogStyle();
+ var style2 = new AlertDialogStyle();
+ style2.CopyFrom(style1);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.Dialog Tests")]
+ public class DialogTests
+ {
+ private const string TAG = "Components";
+
+ public DialogTests()
+ {
+ }
+
+ ~DialogTests()
+ {
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a Dialog object. Check whether Dialog is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.Dialog C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Dialog_INIT()
+ {
+ /* TEST CODE */
+ var dialog = new Dialog();
+ Assert.IsNotNull(dialog, "Can't create success object Dialog");
+ Assert.IsInstanceOf<Dialog>(dialog, "Costruct Dialog Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Content. Check whether Content is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.Dialog.Content A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Content_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var dialog = new Dialog();
+ Assert.IsNotNull(dialog, "Can't create success object Dialog");
+ Assert.IsInstanceOf<Dialog>(dialog, "Costruct Dialog Fail");
+
+ /* TEST CODE */
+ var view = new View();
+ Assert.IsNotNull(view, "Can't create success object View");
+ Assert.IsInstanceOf<View>(view, "Construct View Fail");
+
+ dialog.Content = view;
+ Assert.AreSame(view, dialog.Content, "Retrieved Content should be the same with the set value.");
+ }
+ }
+}
--- /dev/null
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components.Test;
+
+namespace Tizen.NUI.Components.Tests
+{
+ [TestFixture]
+ [Description("Tizen.NUI.Components.DialogPage Tests")]
+ public class DialogPageTests
+ {
+ private const string TAG = "Components";
+
+ public DialogPageTests()
+ {
+ }
+
+ ~DialogPageTests()
+ {
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ Tizen.Log.Info(TAG, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ Tizen.Log.Info(TAG, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Create a DialogPage object. Check whether DialogPage is successfully created or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.DialogPage C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void DialogPage_INIT()
+ {
+ /* TEST CODE */
+ var page = new DialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Content. Check whether Content is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.Content A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Content_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var page = new DialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+
+ /* TEST CODE */
+ var view = new View();
+ Assert.IsNotNull(view, "Can't create success object View");
+ Assert.IsInstanceOf<View>(view, "Construct View Fail");
+
+ page.Content = view;
+ Assert.AreSame(view, page.Content, "Retrieved Content should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test EnableScrim. Check whether EnableScrim is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.EnableScrim A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void EnableScrim_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var page = new DialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+
+ /* TEST CODE */
+ bool enableScrim = false;
+ page.EnableScrim = enableScrim;
+ Assert.AreEqual(enableScrim, page.EnableScrim, "Retrieved EnableScrim should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test EnableDismissOnScrim. Check whether EnableDismissOnScrim is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.EnableDismissOnScrim A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void EnableDismissOnScrim_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var page = new DialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+
+ /* TEST CODE */
+ bool enableDismissOnScrim = false;
+ page.EnableDismissOnScrim = enableDismissOnScrim;
+ Assert.AreEqual(enableDismissOnScrim, page.EnableDismissOnScrim, "Retrieved EnableDismissOnScrim should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ScrimColor. Check whether ScrimColor is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.ScrimColor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ScrimColor_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var page = new DialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+
+ /* TEST CODE */
+ Color color = new Color(1.0f, 0.0f, 0.0f, 1.0f);
+ page.ScrimColor = color;
+ Assert.AreEqual(color.R, page.ScrimColor.R, "Retrieved ScrimColor should be the same with the set value.");
+ Assert.AreEqual(color.G, page.ScrimColor.G, "Retrieved ScrimColor should be the same with the set value.");
+ Assert.AreEqual(color.B, page.ScrimColor.B, "Retrieved ScrimColor should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Scrim. Check whether Scrim is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.Scrim A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void Scrim_CHECK_SET_GET_VALUE()
+ {
+ /* PRECONDITION */
+ var page = new MyDialogPage();
+ Assert.IsNotNull(page, "Can't create success object DialogPage");
+ Assert.IsInstanceOf<DialogPage>(page, "Costruct DialogPage Fail");
+
+ /* TEST CODE */
+ View view = new View();
+ page.SetMyScrim(view);
+ Assert.AreSame(view, page.GetMyScrim(), "Retrieved Scrim should be the same with the set value.");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ShowDialog. Check whether ShowDialog works or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.ShowDialog M")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ShowDialog_CHECK()
+ {
+ try
+ {
+ var view = new View();
+ DialogPage.ShowDialog(view);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ShowAlertDialog. Check whether ShowAlertDialog works or not.")]
+ [Property("SPEC", "Tizen.NUI.Components.DialogPage.ShowAlertDialog M")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Jaehyun Cho, jae_hyun.cho@samsung.com")]
+ public void ShowAlertDialog_CHECK()
+ {
+ try
+ {
+ var view = new View();
+ DialogPage.ShowAlertDialog("title", "message", view);
+ }
+ catch (Exception e)
+ {
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ }
+
+ public class MyDialogPage : DialogPage
+ {
+ public void SetMyScrim(View scrim)
+ {
+ if (Scrim == scrim)
+ {
+ return;
+ }
+
+ Scrim = scrim;
+ }
+
+ public View GetMyScrim()
+ {
+ return Scrim;
+ }
+ }
+ }
+}