Example #1
0
        public void ThemeApplyExternalTheme()
        {
            tlog.Debug(tag, $"ThemeApplyExternalTheme START");
            Theme a1 = new Theme();
            Theme b1 = new Theme();

            Dictionary <string, string> theme = new Dictionary <string, string>
            {
                { "aaa", "111" },
                { "bbb", "222" }
            };

            DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myversion", theme);

            Type componentType      = typeof(string);
            Type styleType          = typeof(string);
            ExternalThemeKeyList e1 = new ExternalThemeKeyList(componentType, styleType);

            HashSet <ExternalThemeKeyList> keyListSet = new HashSet <ExternalThemeKeyList>
            {
                e1
            };

            a1.ApplyExternalTheme(c1, keyListSet);
            a1.ApplyExternalTheme(c1, null);

            tlog.Debug(tag, $"ThemeApplyExternalTheme END (OK)");
            Assert.Pass("ThemeApplyExternalTheme");
        }
Example #2
0
        public void DictionaryExternalThemeConstructor()
        {
            tlog.Debug(tag, $"DictionaryExternalThemeConstructor START");
            string id = "id1"; string version = "version1";
            Dictionary <string, string> theme = new Dictionary <string, string>
            {
                { "aaa", "111" },
                { "bbb", "222" }
            };

            DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);

            tlog.Debug(tag, $"DictionaryExternalThemeConstructor END (OK)");
            Assert.Pass("DictionaryExternalThemeConstructor");
        }
Example #3
0
        public void DictionaryExternalThemeGetValue()
        {
            tlog.Debug(tag, $"DictionaryExternalThemeGetValue START");

            string id = "id1"; string version = "version1";
            Dictionary <string, string> theme = new Dictionary <string, string>
            {
                { "aaa", "111" },
                { "bbb", "222" }
            };

            DictionaryExternalTheme a1        = new DictionaryExternalTheme(id, version, theme);
            string b1 = a1.GetValue("aaa");

            tlog.Debug(tag, $"DictionaryExternalThemeGetValue END (OK)");
            Assert.Pass("DictionaryExternalThemeGetValue");
        }
Example #4
0
        public void ThemeManagerApplyExternalTheme()
        {
            tlog.Debug(tag, $"ThemeManagerApplyExternalTheme START");

            Dictionary <string, string> b1 = new Dictionary <string, string>
            {
                { "test1", "test2" }
            };


            DictionaryExternalTheme c1 = new DictionaryExternalTheme("myid", "myVersion", b1);

            ThemeManager.ApplyExternalTheme(c1);

            tlog.Debug(tag, $"ThemeManagerApplyExternalTheme END (OK)");
            Assert.Pass("ThemeManagerApplyExternalTheme");
        }
Example #5
0
        public void ExternalThemeManagerSetTestTheme()
        {
            tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme START");

            ExternalThemeManager.SetTestTheme(null);

            string id = "id1"; string version = "version1";
            Dictionary <string, string> theme = new Dictionary <string, string>
            {
                { "aaa", "111" },
                { "bbb", "222" }
            };

            DictionaryExternalTheme a1 = new DictionaryExternalTheme(id, version, theme);

            ExternalThemeManager.SetTestTheme(a1);
            ExternalThemeManager.SetTestTheme(id, version, theme);

            tlog.Debug(tag, $"ExternalThemeManagerSetTestTheme END (OK)");
            Assert.Pass("ExternalThemeManagerSetTestTheme");
        }