[NUI][NUI.Devel] Update nui line coverage TCs.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / testcase / public / Xaml / TotalSample / XStatic.xaml.cs
index 1c6f4e5..3179f30 100755 (executable)
@@ -1,41 +1,42 @@
 using NUnit.Framework;
 using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Xaml;
 
 namespace Tizen.NUI.Devel.Tests
 {
+    public class Icons
+    {
+        public const string CLOSE = "ic_close.png";
+    }
 
-       public class Icons
-       {
-               public const string CLOSE = "ic_close.png";
-       }
+    public class MockxStatic
+    {
+        public static string MockStaticProperty { get { return "Property"; } }
+        public const string MockConstant = "Constant";
+        public static string MockField = "Field";
+        public static string MockFieldRef = Icons.CLOSE;
+        public string InstanceProperty { get { return "InstanceProperty"; } }
+        public static readonly Color BackgroundColor = Color.Fuchsia;
 
-       public class MockxStatic
-       {
-               public static string MockStaticProperty { get { return "Property"; } }
-               public const string MockConstant = "Constant";
-               public static string MockField = "Field";
-               public static string MockFieldRef = Icons.CLOSE;
-               public string InstanceProperty { get { return "InstanceProperty"; } }
-               public static readonly Color BackgroundColor = Color.Fuchsia;
-
-               public class Nested {
-                       public static string Foo = "FOO";
-               }
-       }
+        public class Nested
+        {
+            public static string Foo = "FOO";
+        }
+    }
 
-       public enum MockEnum : long
-       {
-               First,
-               Second,
-               Third,
-       }
+    public enum MockEnum : long
+    {
+        First,
+        Second,
+        Third,
+    }
 
     public partial class XStatic : View
-       {
-        public XStatic ()
-               {
+    {
+        public XStatic()
+        {
+#pragma warning disable Reflection // The code contains reflection
             global::Tizen.NUI.Xaml.Extensions.LoadFromXaml(this, typeof(XStatic));
+#pragma warning restore Reflection // The code contains reflection
             staticproperty = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<TextLabel>(this, "staticproperty");
             memberisoptional = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<TextLabel>(this, "memberisoptional");
             color = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<TextLabel>(this, "color");
@@ -44,49 +45,47 @@ namespace Tizen.NUI.Devel.Tests
             field2 = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<TextLabel>(this, "field2");
             nestedField = global::Tizen.NUI.Binding.NameScopeExtensions.FindByName<TextLabel>(this, "nestedField");
         }
+    }
 
-       }
-
-
-       [TestFixture]
-       public class XStaticTests
-       {
-               //{x:Static Member=prefix:typeName.staticMemberName}
-               //{x:Static prefix:typeName.staticMemberName}
+    [TestFixture]
+    public class XStaticTests
+    {
+        //{x:Static Member=prefix:typeName.staticMemberName}
+        //{x:Static prefix:typeName.staticMemberName}
 
-               //The code entity that is referenced must be one of the following:
-               // - A constant
-               // - A static property
-               // - A field
-               // - An enumeration value
-               // All other cases should throw
+        //The code entity that is referenced must be one of the following:
+        // - A constant
+        // - A static property
+        // - A field
+        // - An enumeration value
+        // All other cases should throw
 
-               [SetUp]
-               public void Setup()
-               {
-               }
+        [SetUp]
+        public void Setup()
+        {
+        }
 
-               [TearDown]
-               public void TearDown()
-               {
-               }
+        [TearDown]
+        public void TearDown()
+        {
+        }
 
-               [Test]
-               [Category("P1")]
-               [Description("Extensions LoadFromXaml.")]
-               [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
-               [Property("SPEC_URL", "-")]
-               [Property("CRITERIA", "MR")]
-               public void StaticProperty()
-               {
-                       var layout = new XStatic();
-                       Assert.AreEqual("Property", layout.staticproperty.Text);
-                       Assert.AreEqual("Property", layout.memberisoptional.Text);
-                       Assert.AreEqual(Color.Fuchsia, layout.color.TextColor);
-                       Assert.AreEqual("Constant", layout.constant.Text);
-                       Assert.AreEqual("Field", layout.field.Text);
-                       Assert.AreEqual("ic_close.png", layout.field2.Text);
-                       Assert.AreEqual(MockxStatic.Nested.Foo, layout.nestedField.Text);
-               }
-       }
+        [Test]
+        [Category("P1")]
+        [Description("Extensions LoadFromXaml.")]
+        [Property("SPEC", "Tizen.NUI.Xaml.Extensions.LoadFromXaml M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        public void StaticProperty()
+        {
+            var layout = new XStatic();
+            Assert.AreEqual("Property", layout.staticproperty.Text);
+            Assert.AreEqual("Property", layout.memberisoptional.Text);
+            Assert.AreEqual(Color.Fuchsia, layout.color.TextColor);
+            Assert.AreEqual("Constant", layout.constant.Text);
+            Assert.AreEqual("Field", layout.field.Text);
+            Assert.AreEqual("ic_close.png", layout.field2.Text);
+            Assert.AreEqual(MockxStatic.Nested.Foo, layout.nestedField.Text);
+        }
+    }
 }
\ No newline at end of file