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"));
            }
        }
Example #2
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"));
            }
        }