1 using NUnit.Framework;
3 using System.Collections.Generic;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("internal/Xaml/ValueNode")]
12 public class InternalValueNodeTest
14 private const string tag = "NUITEST";
19 tlog.Info(tag, "Init() is called!");
25 tlog.Info(tag, "Destroy() is called!");
30 [Description("ValueNode Clone")]
31 [Property("SPEC", "Tizen.NUI.Xaml.ValueNode.Clone M")]
32 [Property("SPEC_URL", "-")]
33 [Property("CRITERIA", "MR")]
34 public void ValueNodeCloneTest()
36 tlog.Debug(tag, $"ValueNodeCloneTest START");
40 var node = new ValueNode("1", null, 1, 1);
41 var ret = node.Clone();
42 Assert.IsNotNull(ret, "Should not be equal");
46 tlog.Debug(tag, e.Message.ToString());
47 Assert.Fail("Caught Exception : Failed!");
50 tlog.Debug(tag, $"ValueNodeCloneTest END");
55 [Description("MarkupNode Clone")]
56 [Property("SPEC", "Tizen.NUI.Xaml.MarkupNode.Clone M")]
57 [Property("SPEC_URL", "-")]
58 [Property("CRITERIA", "MR")]
59 public void MarkupNodeCloneTest()
61 tlog.Debug(tag, $"MarkupNodeCloneTest START");
65 var node = new MarkupNode("1", null, 1, 1);
66 var ret = node.Clone();
67 Assert.IsNotNull(ret, "Should not be equal");
71 tlog.Debug(tag, e.Message.ToString());
72 Assert.Fail("Caught Exception : Failed!");
75 tlog.Debug(tag, $"MarkupNodeCloneTest END");
80 [Description("ElementNode Clone")]
81 [Property("SPEC", "Tizen.NUI.Xaml.ElementNode.Clone M")]
82 [Property("SPEC_URL", "-")]
83 [Property("CRITERIA", "MR")]
84 public void ElementNodeCloneTest()
86 tlog.Debug(tag, $"ElementNodeCloneTest START");
90 var node = new ElementNode(null, "1", null, 1, 1);
91 node.Properties.Add(new XmlName("1", "View"), new ElementNode(null, "1", null, 1, 1));
92 node.SkipProperties.Add(new XmlName("1", "View"));
93 node.CollectionItems.Add(new ElementNode(null, "1", null, 1, 1));
94 var ret = node.Clone();
95 Assert.IsNotNull(ret, "Should not be equal");
99 tlog.Debug(tag, e.Message.ToString());
100 Assert.Fail("Caught Exception : Failed!");
103 tlog.Debug(tag, $"ElementNodeCloneTest END");
108 [Description("ListNode Clone")]
109 [Property("SPEC", "Tizen.NUI.Xaml.ListNode.Clone M")]
110 [Property("SPEC_URL", "-")]
111 [Property("CRITERIA", "MR")]
112 public void ListNodeCloneTest()
114 tlog.Debug(tag, $"ListNodeCloneTest START");
118 List<INode> nodes = new List<INode>() { new ElementNode(null, "1", null, 1, 1) };
119 var node = new ListNode(nodes, null, 1, 1);
120 var ret = node.Clone();
121 Assert.IsNotNull(ret, "Should not be equal");
125 tlog.Debug(tag, e.Message.ToString());
126 Assert.Fail("Caught Exception : Failed!");
129 tlog.Debug(tag, $"ListNodeCloneTest END");
134 [Description("ListNode Clone")]
135 [Property("SPEC", "Tizen.NUI.Xaml.INodeExtensions.Clone M")]
136 [Property("SPEC_URL", "-")]
137 [Property("CRITERIA", "MR")]
138 public void INodeExtensionsSkipPrefixTest()
140 tlog.Debug(tag, $"INodeExtensionsSkipPrefixTest START");
144 var node = new ElementNode(null, "1", null, 1, 1);
145 node.IgnorablePrefixes = new List<string>() { "1" };
146 var ret = node.SkipPrefix("1");
148 Assert.True(ret, "Should be true");
152 tlog.Debug(tag, e.Message.ToString());
153 Assert.Fail("Caught Exception : Failed!");
156 tlog.Debug(tag, $"INodeExtensionsSkipPrefixTest END");