protected void CreatePatternFromProjectTemplate()
        {
            Assert.IsNotNull(TestContext.DataRow, "This test must be configured as a data-driven test");
            Assert.IsNotNull(TestContext.DataRow["TemplateId"], "Ensure the data source has a TemplateId column");
            var templatePath = ((Solution2)dte.Solution).GetProjectTemplate((string)TestContext.DataRow["TemplateId"], "CSharp");
            var template     = new VsProjectTemplate(templatePath);

            template.Unfold(projectName, solution);
        }
        public override void InitializeContext()
        {
            base.InitializeContext();

            var templatePath = ((Solution2)dte.Solution).GetProjectTemplate(MainToolkitVsTemplate, "CSharp");
            var template     = new VsProjectTemplate(templatePath);

            template.Unfold(instanceName, this.solution);

            this.pattern = this.patternManager.Products.FirstOrDefault(p => p.InstanceName == instanceName);
        }