Test org.kde.Solid.PowerManagement interface
The code mainly contains:
- UPower mock implementation: To support the upower backend and provide custom information for testing.
- Private DBus daemon setup: To mock UPower DBus interface, a private DBus session has to be set up so the test can register a system bus.
- Actual testing code: Currently two properties are tested, one is currentProfile, the other is batteryRemainingTime. This test will try to mock different data in the UPower backend, and check the interface can provide correct information.
Edited by Fushan Wen