[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / XamlBinding / TSActionSheetArguments.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
6 using System.Reflection;
7 using System.Collections.Generic;
8 using Tizen.NUI.Binding;
9
10 namespace Tizen.NUI.Devel.Tests
11 {
12     using tlog = Tizen.Log;
13
14     [TestFixture]
15     [Description("internal/XamlBinding/ActionSheetArguments")]
16     public class InternalActionSheetArgumentsTest
17     {
18         private const string tag = "NUITEST";
19         private string[] Buttons = { "button1", "button2" };
20
21         [SetUp]
22         public void Init()
23         {
24             tlog.Info(tag, "Init() is called!");
25         }
26
27         [TearDown]
28         public void Destroy()
29         {
30             tlog.Info(tag, "Destroy() is called!");
31         }
32
33         [Test]
34         [Category("P1")]
35         [Description("ActionSheetArguments constructor")]
36         [Property("SPEC", "Tizen.NUI.ActionSheetArguments.ActionSheetArguments C")]
37         [Property("SPEC_URL", "-")]
38         [Property("CRITERIA", "CONSTR")]
39         public void ActionSheetArgumentsConstructor()
40         {
41             tlog.Debug(tag, $"ActionSheetArgumentsConstructor START");
42
43             var testingTarget = new ActionSheetArguments("ActionSheetArguments", "cancel", "destruction", Buttons);
44             Assert.IsNotNull(testingTarget, "Can't create success object ActionSheetArguments.");
45             Assert.IsInstanceOf<ActionSheetArguments>(testingTarget, "Should return ActionSheetArguments instance.");
46
47             tlog.Debug(tag, "Buttons : " + testingTarget.Buttons);
48             tlog.Debug(tag, "Cancel : " + testingTarget.Cancel);
49             tlog.Debug(tag, "Destruction  : " + testingTarget.Destruction);
50             tlog.Debug(tag, "Result  : " + testingTarget.Result);
51             tlog.Debug(tag, "Title   : " + testingTarget.Title);
52
53             try
54             {
55                 testingTarget.SetResult("OK");
56             }
57             catch (Exception e)
58             {
59                 tlog.Debug(tag, e.Message.ToString());
60                 Assert.Fail("Caught Exception : Failed!");
61             }
62
63             tlog.Debug(tag, $"ActionSheetArgumentsConstructor END");
64         }
65     }
66 }