1 using NUnit.Framework;
3 using Tizen.NUI.BaseComponents;
4 using Tizen.NUI.Components;
6 namespace Tizen.NUI.Devel.Tests
8 using tlog = Tizen.Log;
11 [Description("public/Theme/ExternalThemeKeyList")]
12 internal class PublicExternalThemeKeyListTest
14 private const string tag = "NUITEST";
15 private readonly object viewStyle;
20 tlog.Info(tag, "Init() is called!");
26 tlog.Info(tag, "Destroy() is called!");
31 [Description("Create a ExternalThemeKeyList object.")]
32 [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ExternalThemeKeyList C")]
33 [Property("SPEC_URL", "-")]
34 [Property("CRITERIA", "CONSTR")]
35 [Property("COVPARAM", "")]
36 public void ExternalThemeKeyListConstructor()
38 tlog.Debug(tag, $"ExternalThemeKeyListConstructor START");
40 Type componentType = typeof(string);
41 Type styleType = typeof(string);
42 ExternalThemeKeyList a1 = new ExternalThemeKeyList(componentType, styleType);
44 tlog.Debug(tag, $"ExternalThemeKeyListConstructor END (OK)");
45 Assert.Pass("ExternalThemeKeyListConstructor");
50 [Description("ExternalThemeKeyList add")]
51 [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.add M")]
52 [Property("SPEC_URL", "-")]
53 [Property("CRITERIA", "MR")]
54 public void ExternalThemeKeyListadd()
56 tlog.Debug(tag, $"ExternalThemeKeyListadd START");
58 ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
60 keyList.Add<Size>("/Size", (ViewStyle style, Size value) => style.Size = value);
61 tlog.Debug(tag, $"ExternalThemeKeyListadd END (OK)");
62 Assert.Pass("ExternalThemeKeyListadd");
67 [Description("ExternalThemeKeyList AddSelector")]
68 [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddSelector M")]
69 [Property("SPEC_URL", "-")]
70 [Property("CRITERIA", "MR")]
71 public void ExternalThemeKeyListAddSelector()
73 tlog.Debug(tag, $"ExternalThemeKeyListAddSelector START");
75 ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
77 keyList.AddSelector<Color>("/Pickers/ItemTextLabel/TextColor", (ViewStyle style, Selector<Color> value) => ((TimePickerStyle)style).Pickers.ItemTextLabel.TextColor = value, ControlState.Selected);
79 tlog.Debug(tag, $"ExternalThemeKeyListAddSelector END (OK)");
80 Assert.Pass("ExternalThemeKeyListAddSelector");
85 [Description("ExternalThemeKeyList AddBackgroundSelector")]
86 [Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.AddBackgroundSelector M")]
87 [Property("SPEC_URL", "-")]
88 [Property("CRITERIA", "MR")]
89 public void ExternalThemeKeyListAddBackgroundSelector()
91 tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector START");
93 ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
95 keyList.AddBackgroundSelector("/Background", mySetBackgroundColor, mySetBackgroundImage);
97 tlog.Debug(tag, $"ExternalThemeKeyListAddBackgroundSelector END (OK)");
98 Assert.Pass("ExternalThemeKeyListAddBackgroundSelector");
101 private static void mySetBackgroundColor(ViewStyle style, Selector<Color> value)
103 style.BackgroundColor = value;
106 private static void mySetBackgroundImage(ViewStyle style, Selector<string> value)
108 style.BackgroundImage = value;
113 //[Description("ExternalThemeKeyList ApplyKeyActions")]
114 //[Property("SPEC", "Tizen.NUI.ExternalThemeKeyList.ApplyKeyActions M")]
115 //[Property("SPEC_URL", "-")]
116 //[Property("CRITERIA", "MR")]
117 //public void ExternalThemeKeyListApplyKeyActions()
119 // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions START");
121 // ExternalThemeKeyList keyList = new ExternalThemeKeyList(typeof(Button), typeof(ButtonStyle));
123 // Tizen.Applications.ThemeManager.Theme theme();
124 // TizenExternalTheme externalTheme = new TizenExternalTheme();
125 // Theme theme = new Theme();
126 // keyList.ApplyKeyActions(externalTheme, theme);
128 // tlog.Debug(tag, $"ExternalThemeKeyListApplyKeyActions END (OK)");
129 // Assert.Pass("ExternalThemeKeyListApplyKeyActions");