src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// Helper methods for 2 tests above.
/// </summary>
Helper methods for 2 tests above.
Helper methods for 2 tests above .
private static void MyExtSettingsGetAssemblyAutoAddAutoRemoveExistingFile(string[] fileContent)
        {
            string dirPath = System.Environment.CurrentDirectory;
            string filePath = Path.Combine(dirPath, ASM_SETTINGS_FILE_NAME);
            if (CreateFile(filePath, fileContent))
            {
                MyExtensibilitySettings extSettings = new MyExtensibilitySettings(dirPath);
                AssemblyOption vb9AutoAdd = extSettings.GetAssemblyAutoAdd(Util.ASMNAME_VBRUN9);
                Assert.IsTrue(AssemblyOption.Yes == vb9AutoAdd, "AssemblyOption.Yes != vb9AutoAdd");
                AssemblyOption vb9AutoRemove = extSettings.GetAssemblyAutoRemove(Util.ASMNAME_VBRUN9);
                Assert.IsTrue(AssemblyOption.Prompt == vb9AutoRemove, "AssemblyOption.Prompt != vb9AutoRemove");
                AssemblyOption speechAutoAdd = extSettings.GetAssemblyAutoAdd(Util.ASMNAME_SYSTEM_SPEECH);
                Assert.IsTrue(AssemblyOption.Prompt == speechAutoAdd, "AssemblyOption.Prompt != speechAutoAdd");
                AssemblyOption speechAutoRemove = extSettings.GetAssemblyAutoRemove(Util.ASMNAME_SYSTEM_SPEECH);
                Assert.IsTrue(AssemblyOption.No == speechAutoRemove, "AssemblyOption.No != speechAutoRemove");
                File.Delete(filePath);
            }
            else
            {
                Assert.Fail("Could not create settings file.");
            }
        }
private static void MyExtSettingsGetAssemblyAutoAddAutoRemoveExistingFile ( string [ ] fileContent ) { string dirPath = System . Environment . CurrentDirectory ; string filePath = Path . Combine ( dirPath , ASM_SETTINGS_FILE_NAME ) ; if ( CreateFile ( filePath , fileContent ) ) { MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( dirPath ) ; AssemblyOption vb9AutoAdd = extSettings . GetAssemblyAutoAdd ( Util . ASMNAME_VBRUN9 ) ; Assert . IsTrue ( AssemblyOption . Yes == vb9AutoAdd , " " ) ; AssemblyOption vb9AutoRemove = extSettings . GetAssemblyAutoRemove ( Util . ASMNAME_VBRUN9 ) ; Assert . IsTrue ( AssemblyOption . Prompt == vb9AutoRemove , " " ) ; AssemblyOption speechAutoAdd = extSettings . GetAssemblyAutoAdd ( Util . ASMNAME_SYSTEM_SPEECH ) ; Assert . IsTrue ( AssemblyOption . Prompt == speechAutoAdd , " " ) ; AssemblyOption speechAutoRemove = extSettings . GetAssemblyAutoRemove ( Util . ASMNAME_SYSTEM_SPEECH ) ; Assert . IsTrue ( AssemblyOption . No == speechAutoRemove , " " ) ; File . Delete ( filePath ) ; } else { Assert . Fail ( " " ) ; } }
Helper methods for 2 tests above.
Helper methods for 2 tests above .
fileContent
string[]