mirror of https://github.com/dahall/Vanara.git
Updated tests
parent
bf1cbcf3ca
commit
c703c450f9
|
@ -69,7 +69,7 @@ namespace Windows.Forms.App
|
|||
File.Delete(n);
|
||||
|
||||
// Unregister app
|
||||
ProgId.Unregister(appId, true, systemWide);
|
||||
try { ProgId.Unregister(appId, true, systemWide); } catch { }
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
|
|
|
@ -34,6 +34,17 @@ namespace Vanara.Windows.Shell.Tests
|
|||
ShowMII(items[i], i);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRepeatFail()
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
using ShellItem Item = ShellItem.Open(TestCaseSources.ImageFile);
|
||||
using ShellContextMenu ContextMenu = new ShellContextMenu(Item);
|
||||
TestContext.WriteLine(ContextMenu.ComInterface.GetType().Name);
|
||||
}
|
||||
}
|
||||
|
||||
static void ShowMII(ShellContextMenu.MenuItemInfo mii, int c, int indent = 0)
|
||||
{
|
||||
TestContext.WriteLine($"{new string(' ', indent * 3)}{c + 1}) \"{mii.Text}\" (#{mii.Id}) - Type={mii.Type}; State={mii.State}; Verb={mii.Verb}; Tooltip={mii.HelpText}; IconLoc={mii.VerbIconLocation}");
|
||||
|
|
Loading…
Reference in New Issue