Added AudioFileScanner and AudioImageExtractor logic.
This commit is contained in:
@@ -8,7 +8,7 @@ using Shouldly;
|
||||
|
||||
namespace Harmonia.Tests;
|
||||
|
||||
public class TestAudioPlayer(IAudioEngine audioEngine, IPlaylistRepository playlistRepository)
|
||||
internal class TestAudioPlayer(IAudioEngine audioEngine, IPlaylistRepository playlistRepository)
|
||||
: AudioPlayer(audioEngine, playlistRepository)
|
||||
{
|
||||
internal void SetPlaylist(Playlist playlist)
|
||||
@@ -18,10 +18,7 @@ public class TestAudioPlayer(IAudioEngine audioEngine, IPlaylistRepository playl
|
||||
|
||||
internal int GetPlayingSongIndex()
|
||||
{
|
||||
if (Playlist == null)
|
||||
return -1;
|
||||
|
||||
if (PlayingSong == null)
|
||||
if (Playlist == null || PlayingSong == null)
|
||||
return -1;
|
||||
|
||||
return Playlist.Songs.IndexOf(PlayingSong);
|
||||
@@ -68,11 +65,9 @@ public class AudioPlayerTests
|
||||
|
||||
_playlistRepository = Substitute.For<IPlaylistRepository>();
|
||||
_playlistRepository.Get().Returns([playlist]);
|
||||
//_playlistRepository.GetPlaylist(_playlistSongs[0]).Returns(playlist);
|
||||
|
||||
_audioPlayer = new TestAudioPlayer(_audioEngine, _playlistRepository);
|
||||
_audioPlayer.SetPlaylist(playlist);
|
||||
//await _audioPlayer.LoadAsync(_playlistSongs[0], PlaybackMode.LoadOnly);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user