textVisualMap.EnableMarkup = true;
Assert.AreEqual(true, textVisualMap.EnableMarkup, "Retrieved EnableMarkup should be equal to set value");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Shadow. Check whether Shadow is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.TextVisual.Shadow A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+ public void Shadow_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ TextVisual textVisualMap = new TextVisual();
+ PropertyMap shadowMapSet = new PropertyMap();
+ shadowMapSet.Add("color", new PropertyValue(new Color(1.0f, 0.1f, 0.3f, 0.5f)));
+ shadowMapSet.Add("offset", new PropertyValue(new Vector2(2.0f, 1.0f)));
+ shadowMapSet.Add("blurRadius", new PropertyValue(3.0f));
+ textVisualMap.Shadow = shadowMapSet;
+
+ PropertyMap shadowMapGet = new PropertyMap();
+ shadowMapGet = textVisualMap.Shadow;
+ Assert.IsNotNull(shadowMapGet, "Should not be null");
+ Color color = new Color();
+ shadowMapGet["color"].Get(color);
+ Assert.AreEqual(1.0f, color.R, "Retrieved color.R should be equal to set value");
+ Assert.AreEqual(0.1f, color.G, "Retrieved color.G should be equal to set value");
+ Assert.AreEqual(0.3f, color.B, "Retrieved color.B should be equal to set value");
+ Assert.AreEqual(0.5f, color.A, "Retrieved color.A should be equal to set value");
+
+ Vector2 vector2 = new Vector2();
+ shadowMapGet["offset"].Get(vector2);
+ Assert.AreEqual(2.0f, vector2.X, "Retrieved vector2.X should be equal to set value");
+ Assert.AreEqual(1.0f, vector2.Y, "Retrieved vector2.Y should be equal to set value");
+
+ float blurRadius;
+ shadowMapGet["blurRadius"].Get(out blurRadius);
+ Assert.AreEqual(3.0f, blurRadius, "Retrieved blurRadius should equals to the set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Underline. Check whether Underline is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.TextVisual.Underline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+ public void Underline_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ TextVisual textVisualMap = new TextVisual();
+ PropertyMap underlineMapSet = new PropertyMap();
+ underlineMapSet.Add("enable", new PropertyValue("true"));
+ underlineMapSet.Add("color", new PropertyValue("green"));
+ underlineMapSet.Add("height", new PropertyValue("1"));
+ textVisualMap.Underline = underlineMapSet;
+
+ PropertyMap underlineMapGet = new PropertyMap();
+ underlineMapGet = textVisualMap.Underline;
+ Assert.IsNotNull(underlineMapGet, "Should not be null");
+ string str = "";
+ underlineMapGet["enable"].Get(out str);
+ Assert.AreEqual("true", str, "Retrieved enable should equals to the set value");
+ underlineMapGet["color"].Get(out str);
+ Assert.AreEqual("green", str, "Retrieved color should equals to the set value");
+ underlineMapGet["height"].Get(out str);
+ Assert.AreEqual("1", str, "Retrieved height should equals to the set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Outline. Check whether Outline is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.TextVisual.Outline A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.comm")]
+ public void Outline_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ TextVisual textVisualMap = new TextVisual();
+ PropertyMap outlineMapSet = new PropertyMap();
+ outlineMapSet.Add("color", new PropertyValue(new Color(1.0f, 0.1f, 0.3f, 0.5f)));
+ outlineMapSet.Add("width", new PropertyValue("1"));
+ textVisualMap.Outline = outlineMapSet;
+
+ PropertyMap outlineMapGet = new PropertyMap();
+ outlineMapGet = textVisualMap.Outline;
+ Assert.IsNotNull(outlineMapGet, "Should not be null");
+
+ Color color = new Color();\r
+ outlineMapGet["color"].Get(color);
+ Assert.AreEqual(1.0f, color.R, "Retrieved color.R should be equal to set value");
+ Assert.AreEqual(0.1f, color.G, "Retrieved color.G should be equal to set value");
+ Assert.AreEqual(0.3f, color.B, "Retrieved color.B should be equal to set value");
+ Assert.AreEqual(0.5f, color.A, "Retrieved color.A should be equal to set value");
+
+ string str = "";
+ outlineMapGet["width"].Get(out str);
+ Assert.AreEqual("1", str, "Retrieved width should equals to the set value");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Background. Check whether Background is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.TextVisual.Background A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.comm")]
+ public void Background_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ TextVisual textVisualMap = new TextVisual();
+ PropertyMap backgroundMapSet = new PropertyMap();
+ backgroundMapSet.Add("enable", new PropertyValue(true));
+ backgroundMapSet.Add("color", new PropertyValue(new Color(1.0f, 0.1f, 0.3f, 0.5f)));
+ textVisualMap.Background = backgroundMapSet;
+
+ PropertyMap backgroundMapGet = new PropertyMap();
+ backgroundMapGet = textVisualMap.Background;
+ Assert.IsNotNull(backgroundMapGet, "Should not be null");
+ bool enable = false;
+ backgroundMapGet["enable"].Get(out enable);
+ Assert.AreEqual(true, enable, "Retrieved enable should equals to the set value");
+
+ Color color = new Color();
+ backgroundMapGet["color"].Get(color);
+ Assert.AreEqual(1.0f, color.R, "Retrieved color.R should be equal to set value");
+ Assert.AreEqual(0.1f, color.G, "Retrieved color.G should be equal to set value");
+ Assert.AreEqual(0.3f, color.B, "Retrieved color.B should be equal to set value");
+ Assert.AreEqual(0.5f, color.A, "Retrieved color.A should be equal to set value");
+ }
}
}