func assertNoNextTrack(events *sconsify.Events, finished chan bool) { events.NextPlay() // playing spotify shutdown here <-events.ShutdownSpotifyUpdates() events.ShutdownEngine() <-finished }
func assertShutdown(t *testing.T, ui sconsify.UserInterface, events *sconsify.Events, finished chan bool) { go ui.Shutdown() // playing spotify shutdown here <-events.ShutdownSpotifyUpdates() events.ShutdownEngine() if !<-finished { t.Errorf("Not properly finished") } }
func waitForMockEvents(events *sconsify.Events) { for { select { case <-events.PlayUpdates(): case <-events.PauseUpdates(): case <-events.ReplayUpdates(): case <-events.ShutdownSpotifyUpdates(): events.ShutdownEngine() case <-events.SearchUpdates(): } } }