Final SetupAPI tests

pull/375/head
David Hall 2023-02-11 07:58:37 -07:00
parent 79df4564cb
commit 30f7fcc941
1 changed files with 11 additions and 12 deletions

View File

@ -2,7 +2,6 @@
using NUnit.Framework.Internal; using NUnit.Framework.Internal;
using System; using System;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices;
using static Vanara.PInvoke.SetupAPI; using static Vanara.PInvoke.SetupAPI;
namespace Vanara.PInvoke.Tests; namespace Vanara.PInvoke.Tests;
@ -59,6 +58,17 @@ public class SetupAPITests
} }
} }
[Test]
public void SetupDiEnumDriverInfoTest()
{
Assert.That(SetupDiBuildDriverInfoList(hDevInfo, default, SPDIT.SPDIT_CLASSDRIVER), ResultIs.Successful);
System.Collections.Generic.List<SP_DRVINFO_DATA_V2> ie = SetupDiEnumDriverInfo(hDevInfo, null, SPDIT.SPDIT_CLASSDRIVER).ToList();
Assert.That(ie, Is.Not.Empty);
foreach (SP_DRVINFO_DATA_V2 i in ie)
TestContext.WriteLine($"{i.MfgName} : {i.Description}");
}
[Test] [Test]
public void SetupDiGetDevicePropertyKeysTest() public void SetupDiGetDevicePropertyKeysTest()
{ {
@ -77,17 +87,6 @@ public class SetupAPITests
} }
} }
[Test]
public void SetupDiEnumDriverInfoTest()
{
Assert.That(SetupDiBuildDriverInfoList(hDevInfo, default, SPDIT.SPDIT_CLASSDRIVER), ResultIs.Successful);
System.Collections.Generic.List<SP_DRVINFO_DATA_V2> ie = SetupDiEnumDriverInfo(hDevInfo, null, SPDIT.SPDIT_CLASSDRIVER).ToList();
Assert.That(ie, Is.Not.Empty);
foreach (SP_DRVINFO_DATA_V2 i in ie)
TestContext.WriteLine($"{i.MfgName} : {i.Description}");
}
[Test] [Test]
public void SetupDiGetDriverInfoDetailTest() public void SetupDiGetDriverInfoDetailTest()
{ {