Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbelyh committed Feb 6, 2016
1 parent 5c20a64 commit 5d88c48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions PanelAddinWizardTestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using EnvDTE;
using EnvDTE80;
using PanelAddinWizard;
using System.Xml.Serialization;
using System.Xml;

namespace PanelAddinWizardTestApp
{
Expand Down Expand Up @@ -152,7 +154,7 @@ static void TestVisioFiles(XmlWizardOptions options)
ExecuteInstall(options);

options.CreateNewVisioFiles = false;
options.VisioFilePaths = new []
options.VisioFilePaths = new[]
{
@"C:\Projects\github\VisioPanelAddinVSTO\PanelAddinWizardTestApp\Data\X1_M.vss",
@"C:\Projects\github\VisioPanelAddinVSTO\PanelAddinWizardTestApp\Data\X1_M.vst",
Expand Down Expand Up @@ -182,6 +184,7 @@ static void TestLanguage(XmlWizardOptions options)

options.UseSetupLanguage = false;
options.SetupLanguage = "";
options.VisioFilePaths = null;
}

static void ExecuteInstall(XmlWizardOptions options)
Expand All @@ -195,11 +198,18 @@ static void ExecuteInstall(XmlWizardOptions options)
var templatePath = sln.GetProjectTemplate("Template.zip", "VisualBasic");
var path = Path.Combine(TestPath, name);
sln.AddFromTemplate(templatePath, string.Format(path), name);
sln.AddFromTemplate(templatePath, path, name);
var serializer = new XmlSerializer(typeof(XmlWizardOptions));
using (var streamWriter = new StreamWriter(Path.Combine(path, "settings.xml")))
using (var xmlWriter = XmlWriter.Create(streamWriter, new XmlWriterSettings { Indent = true}))
{
serializer.Serialize(xmlWriter, options);
}
foreach (SolutionConfiguration2 sc2 in sln.SolutionBuild.SolutionConfigurations)
foreach (SolutionContext sc in sc2.SolutionContexts)
sc.ShouldBuild = true;
foreach (SolutionContext sc in sc2.SolutionContexts)
sc.ShouldBuild = true;
DTE.ExecuteCommand("Build.BuildSolution");
Expand All @@ -224,7 +234,7 @@ static void ExecuteInstall(XmlWizardOptions options)
}
}
}
});
}

Expand Down Expand Up @@ -269,15 +279,14 @@ private static void DoTests(string vs)
[STAThread]
static void Main(string[] args)
{
var wizardForm = new WizardForm(new TestHost(), "TestAddIn");
wizardForm.ShowDialog();
return;
//var wizardForm = new WizardForm(new TestHost(), "TestAddIn");
//wizardForm.ShowDialog();

XmlWizardOptionsManager.PanelAddinWizardTestApp(() => DoTests("VisualStudio.DTE.10.0"));

XmlWizardOptionsManager.PanelAddinWizardTestApp(() => DoTests("VisualStudio.DTE.12.0"));

XmlWizardOptionsManager.PanelAddinWizardTestApp(() => DoTests("VisualStudio.DTE.14.0"));
}
}
}
}
Binary file modified VSIX/license.rtf
Binary file not shown.

0 comments on commit 5d88c48

Please sign in to comment.