src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// MyExtEditCustomDataXml - Scenario 1 - 2: File contains garbage (random characters).
/// Custom data field is a random string.
/// </summary>
Scenario 1 - 2: File contains garbage (random characters).
Custom data field is a random string.
Scenario 1 - 2 : File contains garbage ( random characters ) . Custom data field is a random string .
[TestMethod()]
        public void MyExtEditCustomDataXmlScenario1_2()
        {
            Mock<Template> templateWithGarbageStringCustomDataMock = Util.CreateTemplateMock(
                "MyExtEditCustomDataXmlScenario1GarbageString",
                "Extension template for MyExtEditCustomDataXml test case, Scenario1. CustomData file contains garbage string.",
                "C:\\Program Files\\Microsoft Visual Studio 11.0\\Common7\\IDE\\ItemTemplatesCache\\VisualBasic\\1033\\MyExtEditCustomDataXmlScenario1GarbageString.zip\\MyExtEditCustomDataXmlScenario1GarbageString.vstemplate",
                "MyExtEditCustomDataXmlScenario1GarbageString.vb",
                string.Format("{0}\n{1}", "zmsccvrurpsypnkzhvuozkbwcrbyayrrovuclmcqlatqpgctkkgljspplvalusutybkuthnuseczqkgv",
                "phoqsfhwferpmrwsgasnwiacwlsfpqzbpewnedastoooqxibhjsprszghmugncgpfqaivi"));
            Mock<Project> projectMock = CreateProjectMock(PROJECTKIND_VB, CUSTOMDATASIGNATURE_VB,
                new Mock<Template>[] { templateWithGarbageStringCustomDataMock });
            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 MyExtEditCustomDataXmlScenario1_2 ( ) { Mock < Template > templateWithGarbageStringCustomDataMock = Util . CreateTemplateMock ( " " , " " , " \\ \\ \\ \\ \\ \\ \\ \\ \\ " , " " , string . Format ( " \n " , " " , " " ) ) ; Mock < Project > projectMock = CreateProjectMock ( PROJECTKIND_VB , CUSTOMDATASIGNATURE_VB , new Mock < Template > [ ] { templateWithGarbageStringCustomDataMock } ) ; MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( " " ) ; List < MyExtensionTemplate > extensionTemplates = extSettings . GetExtensionTemplates ( PROJECTKIND_VB , projectMock . Instance ) ; Assert . IsNull ( extensionTemplates , " " ) ; }
MyExtEditCustomDataXml - Scenario 1 - 2: File contains garbage (random characters).
MyExtEditCustomDataXml - Scenario 1 - 2 : File contains garbage ( random characters ) .