I am creating an application that monitors the status of the UPS (uninterruptible power supply, not a freight company) in order to respond to a change in state under power.
I use the PowerStatus class, which gives information to us (% The battery remains, regardless of whether it is running on AC power or on battery, if a USB connection is available)
For our unit tests, I have my own class, which acts as a facade of the PowerStatus class, and I mock this class to insert various events.
I need a way to model the behavior of the UPS in our integration system. Is there a way to emulate a UPS either directly with windows or through WMI?
source share