diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-30 17:23:18 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-30 17:23:18 -0600 |
commit | 462abafeb9286aa91fdc11bd789914add4db6ca9 (patch) | |
tree | 1b40600d16f7cd3eeb15a266d0d088a77d9f3b75 /tests/volume-control-mock.vala | |
parent | bf558d1150e8ed346c659056ad4c18cbc26b8daa (diff) | |
download | ayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.tar.gz ayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.tar.bz2 ayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.zip |
make VolumeControl::active_output easier to mock for tests
Diffstat (limited to 'tests/volume-control-mock.vala')
-rw-r--r-- | tests/volume-control-mock.vala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/volume-control-mock.vala b/tests/volume-control-mock.vala index 3fbfefe..159df3b 100644 --- a/tests/volume-control-mock.vala +++ b/tests/volume-control-mock.vala @@ -31,7 +31,17 @@ public class VolumeControlMock : VolumeControl public override double mic_volume { get; set; } public override void set_mute (bool mute) { - + } + + private VolumeControl.ActiveOutput _active_output = VolumeControl.ActiveOutput.SPEAKERS; + + public override VolumeControl.ActiveOutput active_output() { + return _active_output; + } + + public void mock_set_active_output (VolumeControl.ActiveOutput val) { + _active_output = val; + this.active_output_changed(val); } public VolumeControlMock(IndicatorSound.Options options) { |