3 using NUnit.Framework.TUnit;
4 using Tizen.NUI.Components;
5 using Tizen.NUI.BaseComponents;
7 namespace Tizen.NUI.Devel.Tests
9 using tlog = Tizen.Log;
12 [Description("public/BaseComponents/View")]
13 public class InternalViewTest
15 private const string tag = "NUITEST";
16 private const int testSize = 100;
17 private const int testPosition = 100;
22 tlog.Info(tag, "Init() is called!");
28 tlog.Info(tag, "Destroy() is called!");
33 [Description("internal API test in Ubuntu, View.ColorMode")]
34 [Property("SPEC", "Tizen.NUI.BaseComponents.View.ColorMode")]
35 [Property("SPEC_URL", "-")]
36 [Property("CRITERIA", "PRO")]
37 [Property("AUTHOR", "dongsug.song@samsung.com")]
38 public void ColorMode_CHECK_DEFAULT_VALUE()
41 View testView = new View();
42 var colormode = testView.ColorMode;
44 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha, colormode, "colormode should be UseOwnMultiplyParentAlpha");
51 [Description("internal API test in Ubuntu, View.ColorMode")]
52 [Property("SPEC", "Tizen.NUI.BaseComponents.View.ColorMode")]
53 [Property("SPEC_URL", "-")]
54 [Property("CRITERIA", "PRO")]
55 [Property("AUTHOR", "dongsug.song@samsung.com")]
56 public void ColorMode_CHECK_DEFAULT_VALUE_WITH_ADDED_VIEW()
59 View testView = new View()
61 Size = new Size(testSize, testSize, 0),
62 Position = new Position(testPosition, testPosition, 0),
63 BackgroundColor = Color.Red,
65 NUIApplication.GetDefaultWindow().Add(testView);
67 var colormode = testView.ColorMode;
69 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha, colormode, "colormode should be UseOwnMultiplyParentAlpha");
77 [Description("internal API test in Ubuntu, View.ColorMode")]
78 [Property("SPEC", "Tizen.NUI.BaseComponents.View.ColorMode")]
79 [Property("SPEC_URL", "-")]
80 [Property("CRITERIA", "PRO")]
81 [Property("AUTHOR", "dongsug.song@samsung.com")]
82 public void ColorMode_SET_GET_VALUE()
85 View testView = new View();
87 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnColor;
88 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnColor, testView.ColorMode, "colormode should be UseOwnColor");
90 testView.ColorMode = Tizen.NUI.ColorMode.UseParentColor;
91 Assert.AreEqual(Tizen.NUI.ColorMode.UseParentColor, testView.ColorMode, "colormode should be UseParentColor");
93 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnMultiplyParentColor;
94 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentColor, testView.ColorMode, "colormode should be UseOwnMultiplyParentColor");
96 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha;
97 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha, testView.ColorMode, "colormode should be UseOwnMultiplyParentAlpha");
104 [Description("internal API test in Ubuntu, View.ColorMode")]
105 [Property("SPEC", "Tizen.NUI.BaseComponents.View.ColorMode")]
106 [Property("SPEC_URL", "-")]
107 [Property("CRITERIA", "PRO")]
108 [Property("AUTHOR", "dongsug.song@samsung.com")]
109 public void ColorMode_SET_GET_VALUE_WITH_ADDED_VIEW()
112 View testView = new View()
114 Size = new Size(testSize, testSize, 0),
115 Position = new Position(testPosition, testPosition, 0),
116 BackgroundColor = Color.Red,
118 NUIApplication.GetDefaultWindow().Add(testView);
120 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnColor;
121 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnColor, testView.ColorMode, "colormode should be UseOwnColor");
123 testView.ColorMode = Tizen.NUI.ColorMode.UseParentColor;
124 Assert.AreEqual(Tizen.NUI.ColorMode.UseParentColor, testView.ColorMode, "colormode should be UseParentColor");
126 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnMultiplyParentColor;
127 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentColor, testView.ColorMode, "colormode should be UseOwnMultiplyParentColor");
129 testView.ColorMode = Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha;
130 Assert.AreEqual(Tizen.NUI.ColorMode.UseOwnMultiplyParentAlpha, testView.ColorMode, "colormode should be UseOwnMultiplyParentAlpha");