Windows: added listComPorts test case

This commit is contained in:
Federico Fissore 2015-04-10 15:27:45 +02:00
parent 61592d78fa
commit 9521d54bee
1 changed files with 10 additions and 0 deletions

View File

@ -14,5 +14,15 @@ public class ListComPortsParserTest {
assertEquals("0X16C0_0X0483", new ListComPortsParser().extractVIDAndPID(listComPortsOutput, "COM24"));
}
@Test
public void shouldFindVIDPID2() throws Exception {
String listComPortsOutput = "COM1 - (Standard port types) - ACPI\\PNP0501\\1\n" +
"COM3 - IVT Corporation - {F12D3CF8-B11D-457E-8641-BE2AF2D6D204}\\IVTCOMM\\1&27902E60&2&0001\n" +
"COM4 - IVT Corporation - {F12D3CF8-B11D-457E-8641-BE2AF2D6D204}\\IVTCOMM\\1&27902E60&2&0002\n" +
"COM18 - FTDI - FTDIBUS\\VID_0403+PID_0000+A9EPHBR7A\\0000";
assertEquals("0X0403_0X0000", new ListComPortsParser().extractVIDAndPID(listComPortsOutput, "COM18"));
}
}