[NUI] Update TCs of NUI.Devel.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / internal / FrameBroker / TSFrameBrokerBase.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.Collections.Generic;
7
8 namespace Tizen.NUI.Devel.Tests
9 {
10     using tlog = Tizen.Log;
11
12     [TestFixture]
13     [Description("internal/FrameBroker/FrameBrokerBase")]
14     public class InternalFrameBrokerBaseTest
15     {
16         private const string tag = "NUITEST";
17         private const string MyAppId = "org.tizen.SampleServiceApp.Tizen";
18         private string path = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "picture.png";
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("P2")]
34         [Description("FrameBrokerBase SendLaunchRequest.")]
35         [Property("SPEC", "Tizen.NUI.FrameBrokerBase.SendLaunchRequest M")]
36         [Property("SPEC_URL", "-")]
37         [Property("CRITERIA", "MR")]
38         [Property("AUTHOR", "guowei.wang@samsung.com")]
39         public void FrameBrokerBaseSendLaunchRequestNullAppControl()
40         {
41             tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl START");
42
43             using (Window window = new Window(new Rectangle(0, 0, 100, 200), false))
44             {
45                 var testingTarget = new DefaultFrameBroker(window);
46                 Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
47                 Assert.IsInstanceOf<DefaultFrameBroker>(testingTarget, "Should be an instance of DefaultFrameBroker type.");
48
49                 try
50                 {
51                     testingTarget.SendLaunchRequest(null, true);
52                 }
53                 catch (Exception e)
54                 {
55                     testingTarget.Dispose();
56                     tlog.Debug(tag, e.Message.ToString());
57                     tlog.Debug(tag, $"FrameBrokerBaseSendLaunchRequestNullAppControl END (OK)");
58                     Assert.Pass("Caught ArgumentException : Passed!");
59                 }
60             }
61         }
62     }
63 }