コード例 #1
0
 public BrowseObjectExtenderTest()
 {
     this.dte = new FakeDte();
     this.solution = new FakeSolution(this.dte);
     this.project = new FakeProject(this.solution);
     this.projectItem = new FakeProjectItem(this.project);
     this.extenderSite = new StubExtenderSite();
 }
コード例 #2
0
 public CustomToolParameterTest()
 {
     this.dte = new FakeDte();
     this.solution = new FakeSolution(this.dte);
     this.project = new FakeProject(this.solution);
     this.projectItem = new FakeProjectItem(this.project);
     this.parent = new CustomToolParameters(this.dte, this.project, this.projectItem.Id);
 }
コード例 #3
0
 public CustomToolParametersTest()
 {
     this.dte = new FakeDte();
     this.dte.AddService(typeof(TemplateLocator), new FakeTemplateLocator(), false);
     this.dte.AddService(typeof(STextTemplating), new FakeTextTemplatingService(), false);
     this.solution = new FakeSolution(this.dte);
     this.project = new FakeProject(this.solution);
     this.projectItem = new FakeProjectItem(this.project);
 }
コード例 #4
0
ファイル: FakeSolution.cs プロジェクト: icool123/T4Toolbox
        public FakeSolution(FakeDte dte)
        {
            Debug.Assert(dte != null, "dte");

            this.Dte = dte;
            this.Projects = new FakeProjects();

            dte.Solution = this;
            dte.AddService(typeof(SVsSolution), this, false);
        }
コード例 #5
0
 public void SetSiteCompletesSuccessfully()
 {
     using (var serviceProvider = new FakeDte())
     using (var package = new T4ToolboxPackage())
     {
         serviceProvider.AddService(typeof(SVsActivityLog), new FakeVsActivityLog(), false);
         IVsPackage vspackage = package;
         Assert.AreEqual(VSConstants.S_OK, vspackage.SetSite(serviceProvider));
     }
 }
コード例 #6
0
ファイル: FakeSolution.cs プロジェクト: toasteur/T4toolbox
        public FakeSolution(FakeDte dte)
        {
            Debug.Assert(dte != null, "dte");

            this.Dte      = dte;
            this.Projects = new FakeProjects();

            dte.Solution = this;
            dte.AddService(typeof(SVsSolution), this, false);
        }
コード例 #7
0
        public OutputFileManagerTest()
        {
            this.dte = new FakeDte();
            this.solution = new FakeSolution(this.dte);
            this.project = new FakeProject(this.solution);
            this.projectItem = new FakeProjectItem(this.project);
            this.textTemplating = new FakeTextTemplating();
            this.queryEditQuerySave = new StubIVsQueryEditQuerySave();
            this.runningDocumentTable = new StubIVsRunningDocumentTable();

            this.dte.AddService(typeof(STextTemplating), this.textTemplating, false);
            this.dte.AddService(typeof(SVsQueryEditQuerySave), this.queryEditQuerySave, false);
            this.dte.AddService(typeof(SVsRunningDocumentTable), this.runningDocumentTable, false);
        }
コード例 #8
0
        public void ProjectItemFinishedGeneratingSetsMetadata()
        {
            using (var dte = new FakeDte())
            {
                var solution = new FakeSolution(dte);
                var project = new FakeProject(solution);
                var projectItem = new FakeProjectItem(project);

                var replacements = new Dictionary<string, string>();
                replacements["$wizarddata$"] = @"
                    <Properties>
                        <Generator>TextTemplatingFilePreprocessor</Generator>
                    </Properties>";

                var wizard = new ItemMetadataWizard();
                wizard.RunStarted(null, replacements, default(WizardRunKind), null);
                wizard.ProjectItemFinishedGenerating(projectItem);

                // Wizard should clear the value
                Assert.AreEqual("TextTemplatingFilePreprocessor", projectItem.GetItemAttribute("Generator"));
            }
        }
コード例 #9
0
 public FakeObjectExtenders(FakeDte dte)
 {
     this.Dte = dte;
     dte.AddService(typeof(ObjectExtenders), this, false);
 }
コード例 #10
0
 public FakeObjectExtenders(FakeDte dte)
 {
     this.Dte = dte;
     dte.AddService(typeof(ObjectExtenders), this, false);
 }