aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool_integrationtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool_integrationtest.py')
-rw-r--r--solo_tool_integrationtest.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py
index af0a921..2fa923a 100644
--- a/solo_tool_integrationtest.py
+++ b/solo_tool_integrationtest.py
@@ -47,6 +47,30 @@ def test_addAndSetSongs():
uut.setSong(i)
assert mockPlayer.currentSong == songs[i]
+def test_nextAndPreviousSong():
+ songs = [
+ "test.flac",
+ "test.mp3"
+ ]
+ mockPlayer = MockPlayer()
+ uut = SoloTool(mockPlayer)
+
+ for s in songs:
+ uut.addSong(s)
+ assert mockPlayer.currentSong == None
+
+ uut.nextSong()
+ assert mockPlayer.currentSong == songs[0]
+
+ uut.previousSong()
+ assert mockPlayer.currentSong == songs[0]
+
+ uut.nextSong()
+ assert mockPlayer.currentSong == songs[1]
+
+ uut.nextSong()
+ assert mockPlayer.currentSong == songs[1]
+
def test_addAndSetAbLimits():
song = "test.flac"
abLimits = [