TextEditor textEditor = new TextEditor();
PropertyMap map = new PropertyMap();
map.Clear();
- PropertyValue value = new PropertyValue("true");
+ PropertyValue value = new PropertyValue(true);
map.Insert("enable", value);
- value = new PropertyValue("red");
+ value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
map.Insert("color", value);
- value = new PropertyValue("1");
+ value = new PropertyValue(0.1f);
map.Insert("height", value);
textEditor.Underline = map;
Assert.AreEqual(map.Count(), textEditor.Underline.Count(), "Retrieved Underline's count should be equal to set value");
- string str1, str2;
- for (uint index = 0u; index < map.Count(); index++)
- {
- map.GetValue(index).Get(out str1);
- textEditor.Underline.GetValue(index).Get(out str2);
- Assert.AreEqual(str1, str2, index + " : should be equals to the set value");
- }
+
+ bool enable = false;
+ Vector4 color = new Vector4();
+ float height = 0.0f;
+ textEditor.Underline.Find(0, "enable").Get(out enable);
+ textEditor.Underline.Find(0, "color").Get(color);
+ textEditor.Underline.Find(0, "height").Get(out height);\r
+\r
+ Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+ Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+ Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
}
[Test]
TextField textField = new TextField();
PropertyMap map = new PropertyMap();
map.Clear();
- PropertyValue value = new PropertyValue("true");
- map.Add("enable", value);
- value = new PropertyValue("red");
- map.Add("color", value);
- value = new PropertyValue("1");
- map.Add("height", value);
+ PropertyValue value = new PropertyValue(true);
+ map.Insert("enable", value);
+ value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ map.Insert("color", value);
+ value = new PropertyValue(0.1f);
+ map.Insert("height", value);
textField.Underline = map;
- Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value");
- string str1, str2;
- for (uint index = 0u; index < map.Count(); index++)
- {
- map.GetValue(index).Get(out str1);
- textField.Underline.GetValue(index).Get(out str2);
- Assert.AreEqual(str1, str2, index + " : should be equals to the set value");
- }
+ Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value");\r
+\r
+ bool enable = false;
+ Vector4 color = new Vector4();
+ float height = 0.0f;
+ textField.Underline.Find(0, "enable").Get(out enable);
+ textField.Underline.Find(0, "color").Get(color);
+ textField.Underline.Find(0, "height").Get(out height);\r
+\r
+ Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+ Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+ Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
}
#if false // currently ACR is not yet proceed. temporarily blocked.
TextLabel textLabel = new TextLabel();
PropertyMap map = new PropertyMap();
map.Clear();
- PropertyValue value = new PropertyValue("true");
+ PropertyValue value = new PropertyValue(true);
map.Insert("enable", value);
- value = new PropertyValue("red");
+ value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
map.Insert("color", value);
- value = new PropertyValue("1");
+ value = new PropertyValue(0.1f);
map.Insert("height", value);
textLabel.Underline = map;
Assert.AreEqual(map.Count(), textLabel.Underline.Count(), "Retrieved Underline should be equal to set value");
- string str1, str2;
- for (uint index = 0u; index < map.Count(); index++)
- {
- map.GetValue(index).Get(out str1);
- textLabel.Underline.GetValue(index).Get(out str2);
- Assert.AreEqual(str1, str2, index + ": should be equals to the set value");
- }
+\r
+ bool enable = false;
+ Vector4 color = new Vector4();
+ float height = 0.0f;
+ textLabel.Underline.Find(0, "enable").Get(out enable);
+ textLabel.Underline.Find(0, "color").Get(color);
+ textLabel.Underline.Find(0, "height").Get(out height);\r
+\r
+ Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+ Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+ Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
}
[Test]