[NUI][TCSACR-423] Add LayoutParamPolicies (MatchParent, WrapContent) 34/258334/1
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 13 May 2021 12:50:31 +0000 (21:50 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 13 May 2021 12:54:27 +0000 (21:54 +0900)
File - src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs

  - Class
    [Add] public static class LayoutParamPolicies

  - Property
    [Add] public const int MatchParent = -1;
    [Add] public const int WrapContent = -2;

Change-Id: I5ebc1e4bc1d97aaec0b7845a61bf98beac46975f

tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs

index 48b3c41..7b1dcdd 100755 (executable)
@@ -949,7 +949,7 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Test Margin. Check whether WidthSpecification is readable and writable.")]
+        [Description("Test WidthSpecification. Check whether WidthSpecification is readable and writable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.View.WidthSpecification A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRW")]
@@ -960,11 +960,19 @@ namespace Tizen.NUI.Tests
             View view = new View();
             view.WidthSpecification = 100;
             Assert.AreEqual(100, view.WidthSpecification, "Should match value set");
+
+            View view2 = new View();
+            view2.WidthSpecification = LayoutParamPolicies.MatchParent;
+            Assert.AreEqual(LayoutParamPolicies.MatchParent, view2.WidthSpecification, "Should match value set");
+
+            View view3 = new View();
+            view3.WidthSpecification = LayoutParamPolicies.WrapContent;
+            Assert.AreEqual(LayoutParamPolicies.WrapContent, view3.WidthSpecification, "Should match value set");
         }
 
         [Test]
         [Category("P1")]
-        [Description("Test Margin. Check whether HeightSpecification is readable and writable.")]
+        [Description("Test HeightSpecification. Check whether HeightSpecification is readable and writable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.View.HeightSpecification A")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "PRW")]
@@ -975,6 +983,14 @@ namespace Tizen.NUI.Tests
             View view = new View();
             view.HeightSpecification = 100;
             Assert.AreEqual(100, view.HeightSpecification, "Should match value set");
+
+            View view2 = new View();
+            view2.HeightSpecification = LayoutParamPolicies.MatchParent;
+            Assert.AreEqual(LayoutParamPolicies.MatchParent, view2.HeightSpecification, "Should match value set");
+
+            View view3 = new View();
+            view3.HeightSpecification = LayoutParamPolicies.WrapContent;
+            Assert.AreEqual(LayoutParamPolicies.WrapContent, view3.HeightSpecification, "Should match value set");
         }
 
         [Test]