aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/notifications-test.cc6
-rw-r--r--tests/volume-control-mock.vala5
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc
index 19aeac1..855b2c1 100644
--- a/tests/notifications-test.cc
+++ b/tests/notifications-test.cc
@@ -257,7 +257,7 @@ TEST_F(NotificationsTest, StreamChanges) {
/* Change Streams, no volume change */
notifications->clearNotifications();
- volume_control_mock_set_mock_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), "alarm");
+ volume_control_mock_mock_set_active_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), VOLUME_CONTROL_STREAM_ALARM);
setMockVolume(volumeControl, 0.5, VOLUME_CONTROL_VOLUME_REASONS_VOLUME_STREAM_CHANGE);
loop(50);
notev = notifications->getNotifications();
@@ -265,7 +265,7 @@ TEST_F(NotificationsTest, StreamChanges) {
/* Change Streams, volume change */
notifications->clearNotifications();
- volume_control_mock_set_mock_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), "alert");
+ volume_control_mock_mock_set_active_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), VOLUME_CONTROL_STREAM_ALERT);
setMockVolume(volumeControl, 0.6, VOLUME_CONTROL_VOLUME_REASONS_VOLUME_STREAM_CHANGE);
loop(50);
notev = notifications->getNotifications();
@@ -273,7 +273,7 @@ TEST_F(NotificationsTest, StreamChanges) {
/* Change Streams, no volume change, volume up */
notifications->clearNotifications();
- volume_control_mock_set_mock_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), "multimedia");
+ volume_control_mock_mock_set_active_stream(VOLUME_CONTROL_MOCK(volumeControl.get()), VOLUME_CONTROL_STREAM_MULTIMEDIA);
setMockVolume(volumeControl, 0.6, VOLUME_CONTROL_VOLUME_REASONS_VOLUME_STREAM_CHANGE);
loop(50);
setMockVolume(volumeControl, 0.65);
diff --git a/tests/volume-control-mock.vala b/tests/volume-control-mock.vala
index 95d6a6a..3fbfefe 100644
--- a/tests/volume-control-mock.vala
+++ b/tests/volume-control-mock.vala
@@ -20,13 +20,12 @@
public class VolumeControlMock : VolumeControl
{
- public string mock_stream { get; set; default = "multimedia"; }
- public override string stream { get { return mock_stream; } }
public void mock_set_is_ready(bool b) { ready = b; }
+ public void mock_set_active_stream(VolumeControl.Stream s) { active_stream = s; }
+ public void mock_set_is_playing(bool b) { is_playing = b; }
public override bool active_mic { get; set; }
public bool mock_mute { get; set; }
public override bool mute { get { return mock_mute; } }
- public void mock_set_is_playing(bool b) { is_playing = b; }
private VolumeControl.Volume _vol = new VolumeControl.Volume();
public override VolumeControl.Volume volume { get { return _vol; } set { _vol = value; }}
public override double mic_volume { get; set; }