src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// Project mock returns a Template instance in which triggering assembly does not have version.
/// Verify that we can get the extension template back with different assembly version.
/// </summary>
Project mock returns a Template instance in which triggering assembly does not have version.
Verify that we can get the extension template back with different assembly version.
Project mock returns a Template instance in which triggering assembly does not have version . Verify that we can get the extension template back with different assembly version .
[TestMethod()]
        public void MyExtSettingsGetExtensionTemplateNoAssemblyVersion()
        {
            MyExtensibilitySettings extSettings = new MyExtensibilitySettings("NotExistedPath");
            Mock<Project> projectMock = CreateProjectMock(PROJECTKIND_VB, CUSTOMDATASIGNATURE_VB,
                new Mock<Template>[] { Util.CreateTemplateMockSample4() });
            List<MyExtensionTemplate> extensionTemplates1 = extSettings.GetExtensionTemplates(PROJECTKIND_VB, projectMock.Instance, Util.ASMNAME_ASMWTVER_1);
            Assert.IsTrue(null != extensionTemplates1 && 1 == extensionTemplates1.Count, "Could not find extension template for " + Util.ASMNAME_ASMWTVER_1);
            List<MyExtensionTemplate> extensionTemplates2 = extSettings.GetExtensionTemplates(PROJECTKIND_VB, projectMock.Instance, Util.ASMNAME_ASMWTVER_2);
            Assert.IsTrue(null != extensionTemplates2 && 1 == extensionTemplates2.Count, "Could not find extension template for " + Util.ASMNAME_ASMWTVER_2);
        }
[ TestMethod ( ) ] public void MyExtSettingsGetExtensionTemplateNoAssemblyVersion ( ) { MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( " " ) ; Mock < Project > projectMock = CreateProjectMock ( PROJECTKIND_VB , CUSTOMDATASIGNATURE_VB , new Mock < Template > [ ] { Util . CreateTemplateMockSample4 ( ) } ) ; List < MyExtensionTemplate > extensionTemplates1 = extSettings . GetExtensionTemplates ( PROJECTKIND_VB , projectMock . Instance , Util . ASMNAME_ASMWTVER_1 ) ; Assert . IsTrue ( null != extensionTemplates1 && 1 == extensionTemplates1 . Count , " " + Util . ASMNAME_ASMWTVER_1 ) ; List < MyExtensionTemplate > extensionTemplates2 = extSettings . GetExtensionTemplates ( PROJECTKIND_VB , projectMock . Instance , Util . ASMNAME_ASMWTVER_2 ) ; Assert . IsTrue ( null != extensionTemplates2 && 1 == extensionTemplates2 . Count , " " + Util . ASMNAME_ASMWTVER_2 ) ; }
Project mock returns a Template instance in which triggering assembly does not have version.
Project mock returns a Template instance in which triggering assembly does not have version .