--- /dev/null
+/*\r
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License\r
+ */\r
+\r
+using NUnit.Framework;\r
+using NUnit.Framework.TUnit;\r
+\r
+namespace Tizen.Common.Tests\r
+{\r
+\r
+ [TestFixture]\r
+ [Description("Tizen.Common.Color Tests")]\r
+ public class ColorTests\r
+ {\r
+\r
+ public const int IntR = 255, IntG = 0, IntB = 0, IntA = 255;\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Create a Color with four values are r, g, b, a.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Color C")]\r
+ [Property("COVPARAM", "int, int, int, int")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Color_CONST_WITH_RGBA()\r
+ {\r
+ var color = new Color(0, 128, 0, 255);\r
+ Assert.AreEqual(0, color.R, "Cannot successfully create Color object");\r
+ Assert.AreEqual(128, color.G, "Cannot successfully create Color object");\r
+ Assert.AreEqual(0, color.B, "Cannot successfully create Color object");\r
+ Assert.AreEqual(255, color.A, "Cannot successfully create Color object");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Create a Color with three values are r, g, b.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Color C")]\r
+ [Property("COVPARAM", "int, int, int")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "CONSTR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Color_CONST_WITH_RGB()\r
+ {\r
+ var color = new Color(0, 128, 0);\r
+ Assert.AreEqual(0, color.R, "Cannot successfully create Color object");\r
+ Assert.AreEqual(128, color.G, "Cannot successfully create Color object");\r
+ Assert.AreEqual(0, color.B, "Cannot successfully create Color object");\r
+ Assert.AreEqual(255, color.A, "Cannot successfully create Color object");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check whether R returns expected value or not.")]\r
+ [Property("SPEC", "Tizen.Common.Color.R A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void R_PROPERTY_GET()\r
+ {\r
+ var color = Color.White;\r
+ Assert.AreEqual(255, color.R, "Value of R should be 255");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check whether G returns expected value or not.")]\r
+ [Property("SPEC", "Tizen.Common.Color.G A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void G_PROPERTY_GET()\r
+ {\r
+ var color = Color.White;\r
+ Assert.AreEqual(255, color.G, "Value of G should be 255");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check whether B returns expected value or not.")]\r
+ [Property("SPEC", "Tizen.Common.Color.B A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void B_PROPERTY_GET()\r
+ {\r
+ var color = Color.White;\r
+ Assert.AreEqual(255, color.B, "Value of B should be 255");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check whether A returns expected value or not.")]\r
+ [Property("SPEC", "Tizen.Common.Color.A A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void A_PROPERTY_GET()\r
+ {\r
+ var color = Color.White;\r
+ Assert.AreEqual(255, color.A, "Value of A should be 255");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the return type of the Equality method.")]\r
+ [Property("SPEC", "Tizen.Common.Color.== M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Equality_COMPARE()\r
+ {\r
+ var color1 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color2 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color3 = Color.FromRgb(IntR - 1, IntG, IntB);\r
+ Assert.IsTrue(color1 == color2, "Equals doens't get True after comparing 2 same colors");\r
+ Assert.IsFalse(color1 == color3, "Equals doens't get False after comparing 2 different colors");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the return type of the Inequality method.")]\r
+ [Property("SPEC", "Tizen.Common.Color.!= M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Inequality_COMPARE()\r
+ {\r
+ var color1 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color2 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color3 = Color.FromRgb(IntR - 1, IntG, IntB);\r
+ Assert.IsFalse(color1 != color2, "Equals doens't get False after comparing 2 same colors");\r
+ Assert.IsTrue(color1 != color3, "Equals doens't get True after comparing 2 different colors");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by FromRgb.")]\r
+ [Property("SPEC", "Tizen.Common.Color.FromRgb M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void FromRgb_RETURN()\r
+ {\r
+ var color = Color.FromRgb(IntR, IntG, IntB);\r
+ Assert.IsNotNull(color, "Instance Color is null");\r
+ Assert.AreEqual(Color.Red, color, "Value of color returned by FromRgb should be red.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by FromRgba.")]\r
+ [Property("SPEC", "Tizen.Common.Color.FromRgba M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void FromRgba_RETURN()\r
+ {\r
+ var color = Color.FromRgba(IntR, IntG, IntB, IntA);\r
+ Assert.IsNotNull(color, "Instance Color is null");\r
+ Assert.AreEqual(Color.Red, color, "Value of color returned by FromRgba should be red.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by FromHex.")]\r
+ [Property("SPEC", "Tizen.Common.Color.FromHex M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void FromHex_RETURN()\r
+ {\r
+ string hex = "#000000";\r
+\r
+ var color = Color.FromHex(hex);\r
+ Assert.IsNotNull(color, "Instance Color is null");\r
+ Assert.AreEqual(Color.Black, color, "Value of color returned by FromHex should be black.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by GetRgba.")]\r
+ [Property("SPEC", "Tizen.Common.Color.GetRgba M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void GetRgba_RETURN()\r
+ {\r
+ uint value = (uint)Color.Red.GetRgba();\r
+ Assert.AreEqual(value, 4278190335, "Value of Color.Red returned by GetRgba should be 4278190335.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by GetArgb.")]\r
+ [Property("SPEC", "Tizen.Common.Color.GetArgb M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void GetArgb_RETURN()\r
+ {\r
+ uint value = (uint)Color.Red.GetArgb();\r
+ Assert.AreEqual(value, 4294901760, "Value of Color.Red returned by GetArgb should be 4294901760.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by ToHex.")]\r
+ [Property("SPEC", "Tizen.Common.Color.ToHex M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void ToHex_RETURN()\r
+ {\r
+ string value = Color.Red.ToHex();\r
+ Assert.AreEqual(value, "#FF0000FF", "Value of Color.Red returned by GetArgb should be #FF0000FF.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Return a boolean indicating whether the given Color is equal to this Color instance.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Equals M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Equals_COMPARE()\r
+ {\r
+ var color1 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color2 = Color.FromRgb(IntR, IntG, IntB);\r
+ var color3 = Color.FromRgb(IntR - 1, IntG, IntB);\r
+ Assert.IsTrue(color1.Equals(color2), "Equals doens't get True after comparing 2 same colors");\r
+ Assert.IsFalse(color1.Equals(color3), "Equals doens't get False after comparing 2 different colors");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check value returned by ToString.")]\r
+ [Property("SPEC", "Tizen.Common.Color.ToString M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void ToString_RETURN()\r
+ {\r
+ var color = Color.FromRgb(IntR, IntG, IntB);\r
+ Assert.IsNotNull(color, "Instance Color is null");\r
+ Assert.IsInstanceOf<Color>(color);\r
+ Assert.AreEqual(Color.Red, color, "Value of color returned by FromRgb should be red.");\r
+\r
+ var str = "Color [R=255, G=0, B=0, A=255]";\r
+ Assert.AreEqual(str, color.ToString(), "ToString doesn't return properly");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the return value of the GetHashCode method.")]\r
+ [Property("SPEC", "Tizen.Common.Color.GetHashCode M")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "MR")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void GetHashCode_RETURN()\r
+ {\r
+ var color1 = Color.FromRgba(IntR, IntG, IntB, IntA);\r
+ var color2 = Color.FromRgba(IntR, IntG, IntB, IntA);\r
+ var color3 = Color.FromRgba(IntR, IntG, 16, 0);\r
+\r
+ var hashCode1 = color1.GetHashCode();\r
+ var hashCode2 = color2.GetHashCode();\r
+ var hashCode3 = color3.GetHashCode();\r
+ Assert.AreEqual(hashCode1, hashCode2, "GetHashCode of two colors same should be same.");\r
+ Assert.AreNotEqual(hashCode1, hashCode3, "GetHashCode of two colors not same should be not equal.");\r
+ }\r
+\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Empty.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Empty A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Empty_READ_ONLY()\r
+ {\r
+ var color = Color.FromRgba(0, 0, 0, 0);\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Empty, "Property Empty should same color create via FromRgba(0, 0, 0, 0)");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Transparent.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Transparent A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Transparent_READ_ONLY()\r
+ {\r
+ var color = Color.FromRgba(0, 0, 0, 0);\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Empty, "Property Transparent should same color create via FromRgba(0, 0, 0, 0)");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Aqua.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Aqua A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Aqua_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#00ffff");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Aqua, "Property Aqua should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Black.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Black A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Black_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#000000");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Black, "Property Black should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Blue.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Blue A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Blue_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#0000ff");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Blue, "Property Blue should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Fuchsia.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Fuchsia A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Fuchsia_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#ff00ff");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Fuchsia, "Property Fuchsia should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Gray.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Gray A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Gray_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#808080");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Gray, "Property Gray should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Green.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Green A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Green_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#008000");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Green, "Property Green should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Lime.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Lime A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Lime_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#00ff00");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Lime, "Property Lime should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Maroon.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Maroon A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Maroon_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#800000");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Maroon, "Property Maroon should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Navy.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Navy A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Navy_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#000080");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Navy, "Property Navy should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Olive.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Olive A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Olive_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#808000");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Olive, "Property Olive should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Purple.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Purple A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Purple_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#800080");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Purple, "Property Purple should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Pink.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Pink A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Pink_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#ff66ff");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Pink, "Property Pink should same color create via hex string refer Xamarin.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Red.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Red A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Red_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#ff0000");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Red, "Property Red should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Silver.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Silver A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Silver_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#c0c0c0");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Silver, "Property Silver should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Teal.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Teal A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Teal_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#008080");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Teal, "Property Teal should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property White.")]\r
+ [Property("SPEC", "Tizen.Common.Color.White A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void White_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#ffffff");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.White, "Property White should same color create via hex string refer w3c.");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check property Yellow.")]\r
+ [Property("SPEC", "Tizen.Common.Color.Yellow A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "WonYoung Choi, wy80.choi@samsung.com")]\r
+ public void Yellow_READ_ONLY()\r
+ {\r
+ var color = Color.FromHex("#ffff00");\r
+ Assert.IsNotNull(color, "Instance color is null");\r
+ Assert.IsInstanceOf<Color>(color, "Should be instance of Color");\r
+ Assert.AreEqual(color, Color.Yellow, "Property Yellow should same color create via hex string refer w3c.");\r
+ }\r
+ }\r
+}\r