[NUI] Update NUI.Devel to fix block and crash issues.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / MarkupExtensions / TSNullExtension.cs
1 using NUnit.Framework;
2 using System;
3 using Tizen.NUI.Xaml;
4
5 namespace Tizen.NUI.Devel.Tests
6 {
7     using tlog = Tizen.Log;
8
9     [TestFixture]
10     [Description("public/xaml/MarkupExtensions/NullExtension")]
11     public class PublicNullExtensionTest
12     {
13         private const string tag = "NUITEST";
14
15         internal class IServiceProviderimplement : IServiceProvider
16         {
17             public object GetService(Type serviceType)
18             {
19                 return null;
20             }
21         }
22
23         [SetUp]
24         public void Init()
25         {
26             tlog.Info(tag, "Init() is called!");
27         }
28
29         [TearDown]
30         public void Destroy()
31         {
32             tlog.Info(tag, "Destroy() is called!");
33         }
34
35         [Test]
36         [Category("P1")]
37         [Description("NullExtension ProvideValue")]
38         [Property("SPEC", "Tizen.NUI.NullExtension.ProvideValue A")]
39         [Property("SPEC_URL", "-")]
40         [Property("CRITERIA", "PRW")]
41         public void NullExtensionProvideValue()
42         {
43             tlog.Debug(tag, $"NullExtensionProvideValue START");
44
45             try
46             {
47                 IServiceProviderimplement serviceProviderimplement = new IServiceProviderimplement();
48                 NullExtension n1 = new NullExtension();
49
50                 n1.ProvideValue(serviceProviderimplement);
51
52                 n1 = null;
53             }
54             catch (Exception e)
55             {
56                 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
57                 Assert.Fail("Caught Exception" + e.ToString());
58             }
59
60             tlog.Debug(tag, $"NullExtensionProvideValue END (OK)");
61             Assert.Pass("NullExtensionProvideValue");
62         }
63     }
64 }