1 using NUnit.Framework;
3 using System.Collections.Generic;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("internal/Xaml/HydrationContext")]
12 internal class PublicHydrationContextTest
14 private const string tag = "NUITEST";
15 private static HydrationContext h1;
20 tlog.Info(tag, "Init() is called!");
21 h1 = new HydrationContext();
27 tlog.Info(tag, "Destroy() is called!");
32 [Description("HydrationContext Values")]
33 [Property("SPEC", "Tizen.NUI.HydrationContext.Values A")]
34 [Property("SPEC_URL", "-")]
35 [Property("CRITERIA", "PRW")]
36 public void HydrationContextValues()
38 tlog.Debug(tag, $"HydrationContextValues START");
42 Dictionary<INode, object> d1 = h1.Values;
46 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
47 Assert.Fail("Caught Exception" + e.ToString());
50 tlog.Debug(tag, $"HydrationContextValues END (OK)");
51 Assert.Pass("HydrationContextValues");
56 [Description("HydrationContext Types")]
57 [Property("SPEC", "Tizen.NUI.HydrationContext.Types A")]
58 [Property("SPEC_URL", "-")]
59 [Property("CRITERIA", "PRW")]
60 public void HydrationContextTypes()
62 tlog.Debug(tag, $"HydrationContextTypes START");
66 Dictionary<IElementNode, Type> d1 = h1.Types;
70 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
71 Assert.Fail("Caught Exception" + e.ToString());
74 tlog.Debug(tag, $"HydrationContextTypes END (OK)");
75 Assert.Pass("HydrationContextTypes");
80 [Description("HydrationContext ParentContext")]
81 [Property("SPEC", "Tizen.NUI.HydrationContext.ParentContext A")]
82 [Property("SPEC_URL", "-")]
83 [Property("CRITERIA", "PRW")]
84 public void HydrationContextParentContext()
86 tlog.Debug(tag, $"HydrationContextParentContext START");
90 HydrationContext hy1 = h1.ParentContext;
91 h1.ParentContext = hy1;
95 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
96 Assert.Fail("Caught Exception" + e.ToString());
99 tlog.Debug(tag, $"HydrationContextParentContext END (OK)");
100 Assert.Pass("HydrationContextParentContext");
105 [Description("HydrationContext ExceptionHandler")]
106 [Property("SPEC", "Tizen.NUI.HydrationContext.ExceptionHandler A")]
107 [Property("SPEC_URL", "-")]
108 [Property("CRITERIA", "PRW")]
109 public void HydrationContextExceptionHandler()
111 tlog.Debug(tag, $"HydrationContextExceptionHandler START");
115 Action<Exception> a1 = h1.ExceptionHandler;
116 h1.ExceptionHandler = a1;
120 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
121 Assert.Fail("Caught Exception" + e.ToString());
124 tlog.Debug(tag, $"HydrationContextExceptionHandler END (OK)");
125 Assert.Pass("HydrationContextExceptionHandler");