src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// MyExtEditCustomDataXml - Scenario 2: Custom data file missing.
/// Again, in this case, CustomData field is NULL (Nothing).
/// </summary>
Scenario 2: Custom data file missing.
Again, in this case, CustomData field is NULL (Nothing).
Scenario 2 : Custom data file missing . Again in this case CustomData field is NULL ( Nothing ) .
[TestMethod()]
        public void MyExtEditCustomDataXmlScenario2()
        {
            Mock<Template> templateWithMissingCustomDataMock = Util.CreateTemplateMock(
                "MyExtEditCustomDataXmlScenario2 template",
                "Extension template for MyExtEditCustomDataXml test case, Scenario 2. CustomData file missing.",
                "C:\\Program Files\\Microsoft Visual Studio 11.0\\Common7\\IDE\\ItemTemplatesCache\\VisualBasic\\1033\\MyExtEditCustomDataXmlScenario2.zip\\MyExtEditCustomDataXmlScenario2.vstemplate",
                "MyExtEditCustomDataXmlScenario2.vb",
                null);
            Mock<Project> projectMock = CreateProjectMock(PROJECTKIND_VB, CUSTOMDATASIGNATURE_VB,
                new Mock<Template>[] { templateWithMissingCustomDataMock });
            MyExtensibilitySettings extSettings = new MyExtensibilitySettings("NotExistedPath");
            List<MyExtensionTemplate> extensionTemplates = extSettings.GetExtensionTemplates(PROJECTKIND_VB, projectMock.Instance);
            Assert.IsNull(extensionTemplates, "Should not get any extension templates!");
        }
[ TestMethod ( ) ] public void MyExtEditCustomDataXmlScenario2 ( ) { Mock < Template > templateWithMissingCustomDataMock = Util . CreateTemplateMock ( " " , " " , " \\ \\ \\ \\ \\ \\ \\ \\ \\ " , " " , null ) ; Mock < Project > projectMock = CreateProjectMock ( PROJECTKIND_VB , CUSTOMDATASIGNATURE_VB , new Mock < Template > [ ] { templateWithMissingCustomDataMock } ) ; MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( " " ) ; List < MyExtensionTemplate > extensionTemplates = extSettings . GetExtensionTemplates ( PROJECTKIND_VB , projectMock . Instance ) ; Assert . IsNull ( extensionTemplates , " " ) ; }
MyExtEditCustomDataXml - Scenario 2: Custom data file missing.
MyExtEditCustomDataXml - Scenario 2 : Custom data file missing .