public async Task notify_play_list_image_url_has_changed_and_send_to_websocket() { var aPlaylistId = APlaylist.Id; var aNewPlayListImageUrl = APlaylist.ImageUrl; var @event = new PlayListImageUrlHasChanged(aPlaylistId, aNewPlayListImageUrl); await playListHasImageUrlHasChanged.Handle(@event); playListNotifier.Received().NotifyPlayListImageUrlHasChanged(aPlaylistId, aNewPlayListImageUrl); playListNotifier.Received().NotifyPlayListImageUrlHasChanged(aPlaylistId, aNewPlayListImageUrl); }
public void notify_play_list_has_been_archived() { var aPlaylistId = APlaylist.Id; playListHasBeenArchived.Handle(new PlayListHasBeenArchived(aPlaylistId)); playListNotifier.Received().NotifyPlayListHasBeenArchived(aPlaylistId); }
public void notify_play_list_image_url_has_changed() { var aPlaylistId = APlaylist.Id; var aNewPlayListImageUrl = APlaylist.ImageUrl; playListHasImageUrlHasChanged.Handle(new PlayListImageUrlHasChanged(aPlaylistId, aNewPlayListImageUrl)); playListNotifier.Received().NotifyPlayListImageUrlHasChanged(aPlaylistId, aNewPlayListImageUrl); }
public void notify_play_list_has_been_renamed() { var aPlaylistId = APlaylist.Id; var aNewPlaylistName = APlaylist.Name; playListHasBeenRenamed.Handle(new PlayListHasBeenRenamed(aPlaylistId, aNewPlaylistName)); playListNotifier.Received().NotifyPlayListHasBeenRenamed(aPlaylistId, aNewPlaylistName); }
public async Task notify_play_list_has_been_archived_and_send_to_websocket() { var aPlaylistId = APlaylist.Id; var @event = new PlayListHasBeenArchived(aPlaylistId); await playListHasBeenArchived.Handle(@event); playListNotifier.Received().NotifyPlayListHasBeenArchived(aPlaylistId); await websocket.Received().PushMessageWithEventToAll(@event); }
public void create_a_play_list() { var aPlaylistId = APlaylist.Id; var aPlaylistName = APlaylist.Name; uniqueIdentifiers.GetNewUniqueIdentifier().Returns(aPlaylistId); var result = createPlayListService.Execute(aPlaylistName); result.IsRight.Should().BeTrue(); VerifyPlayListHasBeenPersistedWith(aPlaylistId, aPlaylistName, PlayListStatus.Active); playListNotifier.Received().NotifyPlayListHasBeenCreated(aPlaylistId, aPlaylistName); }
public void add_an_image_url_to_a_play_list() { var aPlaylistId = APlaylist.Id; var aPlayList = new PlayListBuilder() .WithId(aPlaylistId) .Build(); playListPersistence.GetPlayList(aPlaylistId).Returns(aPlayList); var anImageUrl = APlaylist.AnotherImageUrl; var result = addImageUrlToPlayListService.Execute(aPlaylistId, anImageUrl); result.IsRight.Should().BeTrue(); VerifyPlayListHasBeenPersistedWith(aPlaylistId, anImageUrl); playListNotifier.Received().NotifyPlayListUrlHasChanged(aPlaylistId, anImageUrl); }
public void archive_a_play_list() { var aPlaylistId = APlaylist.Id; var aPlayList = new PlayListBuilder() .WithId(aPlaylistId) .WithStatus(PlayListStatus.Active) .Build(); playListPersistence.GetPlayList(aPlaylistId).Returns(aPlayList); var result = archivePlayListService.Execute(aPlaylistId); result.IsRight.Should().BeTrue(); VerifyPlayListHasBeenPersistedWith(aPlaylistId, PlayListStatus.Archived); playListNotifier.Received().NotifyPlayListHasBeenArchived(aPlaylistId); }
public void change_play_list_name() { var aPlaylistId = APlaylist.Id; var aPlaylistName = APlaylist.Name; var aPlayList = new PlayListBuilder() .WithId(aPlaylistId) .WithName(aPlaylistName) .Build(); playListPersistence.GetPlayList(aPlaylistId).Returns(aPlayList); var anotherPlaylistName = APlaylist.AnotherName; var result = renamePlayListService.Execute(aPlaylistId, anotherPlaylistName); result.IsRight.Should().BeTrue(); VerifyPlayListHasBeenPersistedWith(aPlaylistId, anotherPlaylistName); playListNotifier.Received().NotifyPlayListHasBeenRenamed(aPlaylistId, anotherPlaylistName); }