src/Microsoft.VisualStudio.Editor.UnitTests/MyExtensibility/MyExtensibilitySettingsTest.cs
/// <summary>
/// MyExtEditMyVBExtSetXml scenario 2: File is blank.
/// </summary>
MyExtEditMyVBExtSetXml scenario 2: File is blank.
MyExtEditMyVBExtSetXml scenario 2 : File is blank .
[TestMethod()]
        public void MyExtEditMyVBExtSetXml02()
        {
            string dirPath = System.Environment.CurrentDirectory;
            string filePath = Path.Combine(dirPath, ASM_SETTINGS_FILE_NAME);
            try 
            {
                StreamWriter sw = File.CreateText(filePath);
                sw.Close();
            }
            catch { }
            Assert.IsTrue(File.Exists(filePath), "Could not create file!");
            Assert.IsTrue((new FileInfo(filePath)).Length == 0, "File is not empty!");
            MyExtensibilitySettings extSettings = new MyExtensibilitySettings(dirPath);
            AssemblyOption vb9Option = extSettings.GetAssemblyAutoAdd(Util.ASMNAME_VBRUN9);
            Assert.IsTrue(AssemblyOption.Prompt == vb9Option, "AssemblyOption.Prompt != vb9Option");
            File.Delete(filePath);
        }
[ TestMethod ( ) ] public void MyExtEditMyVBExtSetXml02 ( ) { string dirPath = System . Environment . CurrentDirectory ; string filePath = Path . Combine ( dirPath , ASM_SETTINGS_FILE_NAME ) ; try { StreamWriter sw = File . CreateText ( filePath ) ; sw . Close ( ) ; } catch { } Assert . IsTrue ( File . Exists ( filePath ) , " " ) ; Assert . IsTrue ( ( new FileInfo ( filePath ) ) . Length == 0 , " " ) ; MyExtensibilitySettings extSettings = new MyExtensibilitySettings ( dirPath ) ; AssemblyOption vb9Option = extSettings . GetAssemblyAutoAdd ( Util . ASMNAME_VBRUN9 ) ; Assert . IsTrue ( AssemblyOption . Prompt == vb9Option , " " ) ; File . Delete ( filePath ) ; }
MyExtEditMyVBExtSetXml scenario 2: File is blank.
MyExtEditMyVBExtSetXml scenario 2 : File is blank .