Пример #1
0
func assertNoNextTrack(events *sconsify.Events, finished chan bool) {
	events.NextPlay()

	// playing spotify shutdown here
	<-events.ShutdownSpotifyUpdates()
	events.ShutdownEngine()

	<-finished
}
Пример #2
0
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")
	}
}
Пример #3
0
func waitForMockEvents(events *sconsify.Events) {
	for {
		select {
		case <-events.PlayUpdates():
		case <-events.PauseUpdates():
		case <-events.ReplayUpdates():
		case <-events.ShutdownSpotifyUpdates():
			events.ShutdownEngine()
		case <-events.SearchUpdates():
		}
	}
}