public void WhenFindToolkitOrThrowWithToolkitTemplateVs2012_ThenReturnsToolkit() { var result = InstantiationTemplateWizard.FindToolkitOrThrow(this.manager, Environment.ExpandEnvironmentVariables(this.testToolkitTemplatePath + @"\~PC\Projects\MyTemplate1.zip\MyTemplate1.gen.vstemplate")); Assert.Equal(result.Id, TestToolkitId); }
public void WhenFindToolkitOrThrowWithNonToolkitTemplate_ThenThrows() { var dtePath = Path.GetDirectoryName(this.dte.Application.FullName); Assert.Throws <InvalidOperationException>(() => InstantiationTemplateWizard.FindToolkitOrThrow(this.manager, Path.Combine(dtePath, @"\ProjectTemplates\CSharp\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"))); }
public void WhenFindToolkitOrThrowWithToolkitTemplateVs2010_ThenReturnsToolkit() { var result = InstantiationTemplateWizard.FindToolkitOrThrow(this.manager, Path.Combine(this.toolkit.Extension.InstallPath, @"Templates\Projects\~PC\MyTemplate1.gen.zip\MyTemplate1.gen.vstemplate")); Assert.Equal(result.Id, TestToolkitId); }
public void WhenFindToolkitOrThrowWithUnknownTemplate_ThenThrows() { Assert.Throws <InvalidOperationException>(() => InstantiationTemplateWizard.FindToolkitOrThrow(this.manager, @"C:\undefined.vstemplate")); }