mirror of https://github.com/dahall/Vanara.git
Added further testing for #66
parent
095157dbc3
commit
d284fb6f69
|
@ -94,6 +94,25 @@ namespace Vanara.Windows.Shell.Tests
|
|||
Assert.That(() => new ShellFolder(KNOWNFOLDERID.FOLDERID_Windows).EnumerateChildren((FolderItemFilter)0x80000), Is.Empty);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetDisplayNameTest()
|
||||
{
|
||||
using (var i = new ShellFolder(PInvoke.Tests.TestCaseSources.TempDir))
|
||||
{
|
||||
Assert.That(i.GetDisplayName(ShellItemDisplayString.FileSysPath), Is.EqualTo(PInvoke.Tests.TestCaseSources.TempDir).IgnoreCase);
|
||||
foreach (ShellItemDisplayString e in Enum.GetValues(typeof(ShellItemDisplayString)))
|
||||
Assert.That(() => TestContext.WriteLine($"{e}={i.GetDisplayName(e)}"), Throws.Nothing);
|
||||
Assert.That(i.GetDisplayName((ShellItemDisplayString)0x8fffffff), Is.EqualTo(i.GetDisplayName(0)));
|
||||
}
|
||||
|
||||
using (var i = new ShellFolder(KNOWNFOLDERID.FOLDERID_DocumentsLibrary))
|
||||
{
|
||||
foreach (ShellItemDisplayString e in Enum.GetValues(typeof(ShellItemDisplayString)))
|
||||
Assert.That(() => TestContext.WriteLine($"{e}={i.GetDisplayName(e)}"), Throws.Nothing);
|
||||
Assert.That(i.GetDisplayName((ShellItemDisplayString)0x8fffffff), Is.EqualTo(i.GetDisplayName(0)));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetObjectTest()
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
|
Loading…
Reference in New Issue