-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
app_test.go
76 lines (55 loc) · 1.02 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package fyne
import (
"net/url"
"testing"
"github.com/stretchr/testify/assert"
)
type dummyApp struct{}
func (dummyApp) CloudProvider() CloudProvider {
return nil
}
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) SetCloudProvider(CloudProvider) {
}
func (dummyApp) Settings() Settings {
return nil
}
func (dummyApp) Storage() Storage {
return nil
}
func (dummyApp) Preferences() Preferences {
return nil
}
func (dummyApp) Lifecycle() Lifecycle {
return nil
}
func (dummyApp) Metadata() AppMetadata {
return AppMetadata{}
}
func TestSetCurrentApp(t *testing.T) {
a := &dummyApp{}
SetCurrentApp(a)
assert.Equal(t, a, CurrentApp())
}