It's actually pretty straightforward:
turn_computer_off();
Assert(!is_computer_on(), "Computer should have been off but it's on.");
The opposite is a bit tricky, though.
turn_computer_off();
Assert(!is_computer_on(), "Computer should have been off but it's on.");
The opposite is a bit tricky, though.