コード例 #1
0
ファイル: AttributeTests.cs プロジェクト: RussBaz/PTVS
        public void ProvideLanguageTemplatesAttributeTests() {
            var attr = new ProvideLanguageTemplatesAttribute(
                "{349C5851-65DF-11DA-9384-00065B846F21}", 
                "Python", 
                GuidList.guidDjangoPkgString, 
                "Web", 
                "Python Application Project Templates", 
                "{888888a0-9f3d-457c-b088-3a5042f75d52}", 
                ".py", 
                "Python", 
                "{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}");

            var mockCtx = new MockRegistrationContext();
            attr.Register(mockCtx);
            attr.Unregister(mockCtx);
            Assert.AreEqual(@"CreatedKey: Projects\{349C5851-65DF-11DA-9384-00065B846F21}\LanguageTemplates
SetValue: Projects\{349C5851-65DF-11DA-9384-00065B846F21}\LanguageTemplates, {888888a0-9f3d-457c-b088-3a5042f75d52}{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}
Closed Key: Projects\{349C5851-65DF-11DA-9384-00065B846F21}\LanguageTemplates
CreatedKey: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}
SetValue: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}, Python Application Project Templates
SetValue: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}, a8637c34-aa55-46e2-973c-9c3e09afc17b{888888a0-9f3d-457c-b088-3a5042f75d52}
SetValue: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}, Language(VsTemplate)Python
SetValue: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}, ShowOnlySpecifiedTemplates(VsTemplate)0
SetValue: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}, TemplateGroupIDs(VsTemplate)Web
Created SubKey: WebApplicationProperties
SetValue: WebApplicationProperties, CodeFileExtension.py
SetValue: WebApplicationProperties, TemplateFolderWeb
Closed Key: WebApplicationProperties
Closed Key: Projects\{9AF89C0F-85F6-4A20-9023-5D15D912F3B1}
", mockCtx._result.ToString());
        }
コード例 #2
0
ファイル: AttributeTests.cs プロジェクト: RussBaz/PTVS
        public void ProvideDebugLanguageTests() {
            var attr = new ProvideDebugLanguageAttribute("Django Templates",
                DjangoPackage.DjangoTemplateLanguageId,
                "{" + DjangoPackage.DjangoExpressionEvaluatorGuid + "}",
                "{EC1375B7-E2CE-43E8-BF75-DC638DE1F1F9}");


            var mockCtx = new MockRegistrationContext();
            attr.Register(mockCtx);
            attr.Unregister(mockCtx);
            Assert.AreEqual(@"CreatedKey: Languages\Language Services\Django Templates\Debugger Languages\{918E5764-7026-4D57-918D-19D86AD73AC4}
SetValue: Languages\Language Services\Django Templates\Debugger Languages\{918E5764-7026-4D57-918D-19D86AD73AC4}, Django Templates
CreatedKey: AD7Metrics\ExpressionEvaluator\{918E5764-7026-4D57-918D-19D86AD73AC4}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}
SetValue: AD7Metrics\ExpressionEvaluator\{918E5764-7026-4D57-918D-19D86AD73AC4}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}, LanguageDjango Templates
SetValue: AD7Metrics\ExpressionEvaluator\{918E5764-7026-4D57-918D-19D86AD73AC4}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}, NameDjango Templates
SetValue: AD7Metrics\ExpressionEvaluator\{918E5764-7026-4D57-918D-19D86AD73AC4}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}, CLSID{64F20547-C246-487F-83A6-587BC54BAB2F}
Created SubKey: Engine
SetValue: Engine, 0{EC1375B7-E2CE-43E8-BF75-DC638DE1F1F9}
", mockCtx._result.ToString());
        }
コード例 #3
0
ファイル: AttributeTests.cs プロジェクト: RussBaz/PTVS
        public void ProvideEditorExtension2AttributeTests() {
            var attr = new ProvideEditorExtension2Attribute(
                    typeof(DjangoEditorFactory),
                    ".djt",
                    50,
                    "*:1");

            attr.ProjectGuid = "{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3}";
            attr.NameResourceID = 102;
            attr.DefaultName = "webpage";

            var mockCtx = new MockRegistrationContext();
            attr.Register(mockCtx);
            attr.Unregister(mockCtx);
            Assert.AreEqual(@"CreatedKey: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}
SetValue: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}, webpage
SetValue: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}, DisplayName#102
SetValue: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}, Package{a8637c34-aa55-46e2-973c-9c3e09afc17b}
Closed Key: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}
CreatedKey: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}\Extensions
SetValue: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}\Extensions, djt50
SetValue: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}\Extensions, *1
Closed Key: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}\Extensions
CreatedKey: Projects\{a2fe74e1-b743-11d0-ae1a-00a0c90fffc3}\AddItemTemplates\TemplateDirs\{a8637c34-aa55-46e2-973c-9c3e09afc17b}\/1
SetValue: Projects\{a2fe74e1-b743-11d0-ae1a-00a0c90fffc3}\AddItemTemplates\TemplateDirs\{a8637c34-aa55-46e2-973c-9c3e09afc17b}\/1, #102
SetValue: Projects\{a2fe74e1-b743-11d0-ae1a-00a0c90fffc3}\AddItemTemplates\TemplateDirs\{a8637c34-aa55-46e2-973c-9c3e09afc17b}\/1, SortPriority50
Closed Key: Projects\{a2fe74e1-b743-11d0-ae1a-00a0c90fffc3}\AddItemTemplates\TemplateDirs\{a8637c34-aa55-46e2-973c-9c3e09afc17b}\/1
RemovedKey: Editors\{e1b7abde-cdde-4874-a8a6-5b5c7597a848}
RemovedKey: Projects\{a2fe74e1-b743-11d0-ae1a-00a0c90fffc3}\AddItemTemplates\TemplateDirs\{a8637c34-aa55-46e2-973c-9c3e09afc17b}
", mockCtx._result.ToString());
        }