package fyne

import (
	"net/url"
	"testing"

	"github.com/stretchr/testify/assert"
)

type dummyApp struct{}

func (dummyApp) NewWindow(title string) Window {
	return nil
}

func (dummyApp) OpenURL(url *url.URL) error {
	return nil
}

func (dummyApp) Icon() Resource {
	return nil
}

func (dummyApp) SetIcon(Resource) {
}

func (dummyApp) Run() {
}

func (dummyApp) Quit() {
}

func (dummyApp) Driver() Driver {
	return nil
}

func (dummyApp) UniqueID() string {
	return "dummy"
}

func (dummyApp) Settings() Settings {
	return nil
}

func (dummyApp) Preferences() Preferences {
	return nil
}

func TestSetCurrentApp(t *testing.T) {
	a := &dummyApp{}
	SetCurrentApp(a)

	assert.Equal(t, a, CurrentApp())
}
