src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// Helper method for the 2 tests above.
/// </summary>
Helper method for the 2 tests above.
Helper method for the 2 tests above .
private void MyExtSettingsSetAssemblyWithUnknownAssembly(bool autoAdd)
        {
            string dirPath = Environment.CurrentDirectory;
            MyExtensibilitySettings extSettings = new MyExtensibilitySettings(dirPath);
            Mock<Project> projectMock = CreateProjectMock(PROJECTKIND_VB, CUSTOMDATASIGNATURE_VB,
                new Mock<Template>[] { Util.CreateTemplateMockSample1() });
            if (autoAdd)
            {
                extSettings.SetAssemblyAutoAdd(Util.ASMNAME_SYSTEM_SPEECH, true);
            }
            else 
            {
                extSettings.SetAssemblyAutoRemove(Util.ASMNAME_SYSTEM_SPEECH, true);
            }
            string filePath = Path.Combine(dirPath, ASM_SETTINGS_FILE_NAME);
            bool settingsFileExist = File.Exists(filePath);
            Assert.IsTrue(settingsFileExist, "Even though the assembly is unknown, settings file should still be created.");
            if (settingsFileExist)
            {
                File.Delete(filePath);
            }
        }
private void MyExtSettingsSetAssemblyWithUnknownAssembly ( bool autoAdd ) { string dirPath = Environment . CurrentDirectory ; MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( dirPath ) ; Mock < Project > projectMock = CreateProjectMock ( PROJECTKIND_VB , CUSTOMDATASIGNATURE_VB , new Mock < Template > [ ] { Util . CreateTemplateMockSample1 ( ) } ) ; if ( autoAdd ) { extSettings . SetAssemblyAutoAdd ( Util . ASMNAME_SYSTEM_SPEECH , true ) ; } else { extSettings . SetAssemblyAutoRemove ( Util . ASMNAME_SYSTEM_SPEECH , true ) ; } string filePath = Path . Combine ( dirPath , ASM_SETTINGS_FILE_NAME ) ; bool settingsFileExist = File . Exists ( filePath ) ; Assert . IsTrue ( settingsFileExist , " " ) ; if ( settingsFileExist ) { File . Delete ( filePath ) ; } }
Helper method for the 2 tests above.
Helper method for the 2 tests above .
autoAdd
bool