public void ParseEnglishPnpUtilEnumerateResultWithDummyLineTest() { List <DriverStoreEntry> entries = PnpUtil.ParsePnpUtilEnumerateResult(EnglishPnpUtilEnumerateOutputWithDummyLine); Assert.IsNotNull(entries); Assert.AreEqual(1, entries.Count); Assert.AreEqual("oem4.inf", entries[0].DriverPublishedName); Assert.AreEqual("Microsoft", entries[0].DriverPkgProvider); Assert.AreEqual("Human Interface Devices", entries[0].DriverClass); Assert.AreEqual(new DateTime(2015, 11, 06, 0, 0, 0, DateTimeKind.Unspecified), entries[0].DriverDate); Assert.AreEqual(new Version(9, 9, 114, 0), entries[0].DriverVersion); Assert.AreEqual("Microsoft Windows Hardware Compatibility Publisher", entries[0].DriverSignerName); }
public void ParseRussianPnpUtilEnumerateResultTest() { List <DriverStoreEntry> entries = PnpUtil.ParsePnpUtilEnumerateResult(RussianPnpUtilEnumerateOutput); Assert.IsNotNull(entries); Assert.AreEqual(1, entries.Count); Assert.AreEqual("oem0.inf", entries[0].DriverPublishedName); Assert.AreEqual("Cisco Systems", entries[0].DriverPkgProvider); Assert.AreEqual("Сетевые адаптеры", entries[0].DriverClass); Assert.AreEqual(new DateTime(2014, 02, 26, 0, 0, 0, DateTimeKind.Unspecified), entries[0].DriverDate); Assert.AreEqual(new Version(3, 1, 6019, 0), entries[0].DriverVersion); Assert.AreEqual("Microsoft Windows Hardware Compatibility Publisher", entries[0].DriverSignerName); }
public void ParseChinesePnpUtilEnumerateResultTest() { List <DriverStoreEntry> entries = PnpUtil.ParsePnpUtilEnumerateResult(ChinesePnpUtilEnumerateOutput); Assert.IsNotNull(entries); Assert.AreEqual(1, entries.Count); Assert.AreEqual("oem0.inf", entries[0].DriverPublishedName); Assert.AreEqual("Microsoft", entries[0].DriverPkgProvider); Assert.AreEqual("打印机", entries[0].DriverClass); Assert.AreEqual(new DateTime(2006, 06, 21, 0, 0, 0, DateTimeKind.Unspecified), entries[0].DriverDate); Assert.AreEqual(new Version(6, 1, 7600, 16385), entries[0].DriverVersion); Assert.AreEqual("Microsoft Windows", entries[0].DriverSignerName); }
public void ParseLongRussianPnpUtilEnumerateResultTest() { List <DriverStoreEntry> entries = PnpUtil.ParsePnpUtilEnumerateResult(LongRussianPnpUtilEnumerateOutput); Assert.IsNotNull(entries); Assert.AreEqual(38, entries.Count); Assert.IsTrue(entries.All(e => !string.IsNullOrEmpty(e.DriverPublishedName))); Assert.IsTrue(entries.All(e => !string.IsNullOrEmpty(e.DriverPkgProvider))); Assert.IsTrue(entries.All(e => !string.IsNullOrEmpty(e.DriverClass))); Assert.IsTrue(entries.All(e => e.DriverDate != default(DateTime))); Assert.IsTrue(entries.All(e => e.DriverVersion != null)); // DriverSignerName is not always available in this sample // Assert.IsTrue(entries.All(e => !string.IsNullOrEmpty(e.DriverSignerName))); }