1 using NUnit.Framework;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("public/xaml/XamlParseException ")]
12 internal class PublicXamlParseExceptionTest
14 private const string tag = "NUITEST";
15 private XamlParseException xamlParseException;
19 tlog.Info(tag, "Init() is called!");
20 xamlParseException = new XamlParseException("myMessage");
26 xamlParseException = null;
27 tlog.Info(tag, "Destroy() is called!");
30 private class XmlLineInfoImplent : IXmlLineInfo
32 public int LineNumber => throw new NotImplementedException();
34 public int LinePosition => throw new NotImplementedException();
36 public bool HasLineInfo()
38 throw new NotImplementedException();
44 [Description("XamlParseException XamlParseException")]
45 [Property("SPEC", "Tizen.NUI.XamlParseException.XamlParseException C")]
46 [Property("SPEC_URL", "-")]
47 [Property("CRITERIA", "CONSTR")]
48 public void XamlParseExceptionConstructor1()
50 tlog.Debug(tag, $"XamlParseExceptionConstructor START");
52 XamlParseException x1 = new XamlParseException("myMessage");
56 tlog.Debug(tag, $"XamlParseExceptionConstructor END (OK)");
57 Assert.Pass("XamlParseExceptionConstructor");
62 [Description("XamlParseException XamlParseException")]
63 [Property("SPEC", "Tizen.NUI.XamlParseException.XamlParseException C")]
64 [Property("SPEC_URL", "-")]
65 [Property("CRITERIA", "CONSTR")]
66 public void XamlParseExceptionConstructor2()
68 tlog.Debug(tag, $"XamlParseExceptionConstructor START");
70 XamlParseException x2 = new XamlParseException();
74 tlog.Debug(tag, $"XamlParseExceptionConstructor END (OK)");
75 Assert.Pass("XamlParseExceptionConstructor");
80 [Description("XamlParseException XamlParseException")]
81 [Property("SPEC", "Tizen.NUI.XamlParseException.XamlParseException C")]
82 [Property("SPEC_URL", "-")]
83 [Property("CRITERIA", "CONSTR")]
84 public void XamlParseExceptionConstructor3()
86 tlog.Debug(tag, $"XamlParseExceptionConstructor START");
88 Exception e1 = new Exception();
89 XamlParseException x3 = new XamlParseException("myMessage", e1);
92 tlog.Debug(tag, $"XamlParseExceptionConstructor END (OK)");
93 Assert.Pass("XamlParseExceptionConstructor");
98 [Description("XamlParseException XamlParseException")]
99 [Property("SPEC", "Tizen.NUI.XamlParseException.XamlParseException C")]
100 [Property("SPEC_URL", "-")]
101 [Property("CRITERIA", "CONSTR")]
102 public void XamlParseExceptionConstructor4()
104 tlog.Debug(tag, $"XamlParseExceptionConstructor START");
106 Exception e1 = new Exception();
107 XmlLineInfoImplent xmlLineInfoImplent = new XmlLineInfoImplent();
108 XamlParseException x4 = new XamlParseException("myMessage", xmlLineInfoImplent, e1);
112 tlog.Debug(tag, $"XamlParseExceptionConstructor END (OK)");
113 Assert.Pass("XamlParseExceptionConstructor");
118 [Description("XamlParseException XmlInfo ")]
119 [Property("SPEC", "Tizen.NUI.XamlParseException.XmlInfo A")]
120 [Property("SPEC_URL", "-")]
121 [Property("CRITERIA", "PRW")]
122 public void XamlParseExceptionXmlInfo()
124 tlog.Debug(tag, $"XamlParseExceptionXmlInfo START");
127 XmlLineInfoImplent xml1 = (XmlLineInfoImplent)xamlParseException.XmlInfo;
131 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
132 Assert.Fail("Caught Exception" + e.ToString());
134 tlog.Debug(tag, $"XamlParseExceptionXmlInfo END (OK)");
135 Assert.Pass("XamlParseExceptionXmlInfo");
140 [Description("XamlParseException UnformattedMessage ")]
141 [Property("SPEC", "Tizen.NUI.XamlParseException.UnformattedMessage A")]
142 [Property("SPEC_URL", "-")]
143 [Property("CRITERIA", "PRW")]
144 public void XamlParseExceptionUnformattedMessage()
146 tlog.Debug(tag, $"XamlParseExceptionUnformattedMessage START");
149 string s1 = xamlParseException.UnformattedMessage;
153 Tizen.Log.Error(tag, "Caught Exception" + e.ToString());
154 Assert.Fail("Caught Exception" + e.ToString());
156 tlog.Debug(tag, $"XamlParseExceptionUnformattedMessage END (OK)");
157 Assert.Pass("XamlParseExceptionUnformattedMessage");