forked from fyne-io/fyne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_test.go
57 lines (41 loc) · 760 Bytes
/
app_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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) SendNotification(*Notification) {
}
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())
}