aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_multiple_devices.cc
Commit message (Collapse)AuthorAge
* Replace NK_status with NK_get_status_as_string in unit testsRobin Krahl2019-01-28
|
* Add test for NK_list_devices to test_multiple_deviceswip/multiple-devicesRobin Krahl2019-01-13
| | | | | As we cannot test this function properly in Python (due to missing struct definitions), we test it in the C++ test suite.
* Change std::wstring to std::string in DeviceInfoRobin Krahl2019-01-13
| | | | | | | For easier handling, we should use a std::string instead of std::wstring for the serial number in DeviceInfo. For the conversion, I assume that the serial number is valid UTF-8. As it should be alphanumeric and ASCII only, this should be true.
* Add test case for NitrokeyManager::connect_with_path to test_multiple_devicesRobin Krahl2019-01-13
| | | | | | The current test case is renamed to “Use Storage API” as it queries the storage status. The new test case, “Use API”, lists all connected devices and prints their model, path and serial number.
* Add test case for Device::enumerate to test_multiple_devicesRobin Krahl2019-01-13
| | | | | | The current test case is renamed to “List Storage devices” as it also displays the SD card ID. The new test case, “List devices”, lists all connected devices and prints their model, path and serial number.
* Make Device::enumerate staticRobin Krahl2019-01-13
| | | | | | | | | | | Device::enumerate does not need any instance data, therefore it is made static. Note that this not only changes the public API by making the method static. We also return all connected Nitrokey devices instead of only Storage devices. The NitrokeyManager method list_devices_by_cpuID is changed to check the device type so that they still only return Storage devices. The list_device method now returns both Storage and Pro devices.
* Change Nitrokey::list_devices return type to use DeviceInfoRobin Krahl2019-01-13
| | | | | | In the previous commit, we changed the return value of Device::enumerate to std::vector<DeviceInfo>. Now we change Nitrokey::list_devices to also return DeviceInfo instances.
* Change Device::enumerate return type to use DeviceInfoRobin Krahl2019-01-13
| | | | | | The return type of Device::enumerate is changed from std::vector<std::string> to std::vector<DeviceInfo> to expose the additional information contained in the DeviceInfo struct.
* Update for compatibility with Catch2 version 2.3.0Tom Hughes2018-07-24
|
* Add missing licensesSzczepan Zalega2018-03-13
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add test's scenario descriptionsSzczepan Zalega2018-02-28
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add tests for refreshed devices list and not refreshed in the loopSzczepan Zalega2018-02-28
| | | | | | Add it to CMake Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* List devices by unique SC:SD idSzczepan Zalega2018-02-28
| | | | | | | Add C API and tests Add mutexes Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Initial support for multiple devices with C++ and testSzczepan Zalega2018-02-28
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>