[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / XamlBinding / TSAlertArguments.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/AlertArguments")]
16     public class InternalAlertArgumentsTest
17     {
18         private const string tag = "NUITEST";
19
20         [SetUp]
21         public void Init()
22         {
23             tlog.Info(tag, "Init() is called!");
24         }
25
26         [TearDown]
27         public void Destroy()
28         {
29             tlog.Info(tag, "Destroy() is called!");
30         }
31
32         [Test]
33         [Category("P1")]
34         [Description("AlertArguments constructor")]
35         [Property("SPEC", "Tizen.NUI.AlertArguments.AlertArguments C")]
36         [Property("SPEC_URL", "-")]
37         [Property("CRITERIA", "CONSTR")]
38         public void AlertArgumentsConstructor()
39         {
40             tlog.Debug(tag, $"AlertArgumentsConstructor START");
41
42             var testingTarget = new AlertArguments("AlertArguments", "AlertArguments", "ACCEPT", "CANCEL");
43             Assert.IsNotNull(testingTarget, "Can't create success object AlertArguments.");
44             Assert.IsInstanceOf<AlertArguments>(testingTarget, "Should return AlertArguments instance.");
45
46             tlog.Debug(tag, "Accept  : " + testingTarget.Accept);
47             tlog.Debug(tag, "Cancel  : " + testingTarget.Cancel);
48             tlog.Debug(tag, "Message   : " + testingTarget.Message);
49             tlog.Debug(tag, "Result  : " + testingTarget.Result);
50             tlog.Debug(tag, "Title   : " + testingTarget.Title);
51
52             try
53             {
54                 testingTarget.SetResult(true);
55             }
56             catch (Exception e)
57             {
58                 tlog.Debug(tag, e.Message.ToString());
59                 Assert.Fail("Caught Exception : Failed!");
60             }
61
62             tlog.Debug(tag, $"AlertArgumentsConstructor END");
63         }
64     }
65 }