private void TestTheme(TextFormattingRunProperties textProperties, Theme? expectedTheme)
        {
            var classificationFormatMapService=new StubIClassificationFormatMapService();
            classificationFormatMapService.GetClassificationFormatMapString = category => {
                return new StubIClassificationFormatMap {
                    DefaultTextPropertiesGet = () => textProperties
                };
            };

            var environmentService = Utils.CreateEnvironmentService(classificationFormatMapService);
            var theme = environmentService.GetTheme();
            Assert.AreEqual(expectedTheme, theme);
        }
Пример #2
0
        private void TestTheme(TextFormattingRunProperties textProperties, Theme?expectedTheme)
        {
            var classificationFormatMapService = new StubIClassificationFormatMapService();

            classificationFormatMapService.GetClassificationFormatMapString = category => {
                return(new StubIClassificationFormatMap {
                    DefaultTextPropertiesGet = () => textProperties
                });
            };

            var environmentService = Utils.CreateEnvironmentService(classificationFormatMapService);
            var theme = environmentService.GetTheme();

            Assert.AreEqual(expectedTheme, theme);
        }