[NUI] Update TCs of NUI.Devel.
[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 IServiceProviderImpl : IServiceProvider
16         {
17             public object GetService(Type serviceType) { return null; }
18         }
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("NullExtension ProvideValue")]
35         [Property("SPEC", "Tizen.NUI.NullExtension.ProvideValue A")]
36         [Property("SPEC_URL", "-")]
37         [Property("CRITERIA", "PRW")]
38         public void NullExtensionProvideValue()
39         {
40             tlog.Debug(tag, $"NullExtensionProvideValue START");
41
42             try
43             {
44                 var testingTarget = new NullExtension();
45                 Assert.IsNotNull(testingTarget, "null NullExtension");
46
47                 testingTarget.ProvideValue(new IServiceProviderImpl());
48             }
49             catch (Exception e)
50             {
51                 tlog.Debug(tag, e.Message.ToString());
52                 Assert.Fail("Caught Exception : Failed!");
53             }
54
55             tlog.Debug(tag, $"NullExtensionProvideValue END");
56         }
57     }
58 }