From 9436fbcb4994779fe1d9a56fc167420eead8a9b7 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 22 Dec 2021 19:59:51 +0100 Subject: Added getter integration test --- solo_tool_integrationtest.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'solo_tool_integrationtest.py') diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py index 927bd2c..22e8143 100644 --- a/solo_tool_integrationtest.py +++ b/solo_tool_integrationtest.py @@ -241,3 +241,25 @@ def test_addInexistentFile(): uut.setSong(0) assert mockPlayer.currentSong == None + +def test_getters(): + song = "test.flac" + abLimit = [0.2, 0.4] + mockPlayer = MockPlayer() + uut = SoloTool(mockPlayer) + + uut.addSong(song) + uut.setSong(0) + uut.addAbLimit(abLimit[0], abLimit[1]) + + assert uut.getSongs() == [song] + + limits = uut.getAbLimits() + assert len(limits) == 1 + assert limits[0][0] == abLimit[0] + assert limits[0][1] == abLimit[1] + + mockPlayer.position = 0.8 + assert uut.getPlaybackPosition() == 0.8 + + -- cgit v1.2.3