forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfake.go
52 lines (40 loc) · 1.13 KB
/
fake.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
package licensingtest
import (
"github.com/stretchr/testify/mock"
"github.com/grafana/grafana/pkg/services/licensing"
)
var _ licensing.Licensing = new(FakeLicensing)
func NewFakeLicensing() *FakeLicensing {
return &FakeLicensing{&mock.Mock{}}
}
type FakeLicensing struct {
*mock.Mock
}
func (f *FakeLicensing) Expiry() int64 {
mockedArgs := f.Called()
return mockedArgs.Get(0).(int64)
}
func (f *FakeLicensing) Edition() string {
mockedArgs := f.Called()
return mockedArgs.Get(0).(string)
}
func (f *FakeLicensing) ContentDeliveryPrefix() string {
mockedArgs := f.Called()
return mockedArgs.Get(0).(string)
}
func (f *FakeLicensing) LicenseURL(showAdminLicensingPage bool) string {
mockedArgs := f.Called(showAdminLicensingPage)
return mockedArgs.Get(0).(string)
}
func (f *FakeLicensing) StateInfo() string {
mockedArgs := f.Called()
return mockedArgs.Get(0).(string)
}
func (f *FakeLicensing) EnabledFeatures() map[string]bool {
mockedArgs := f.Called()
return mockedArgs.Get(0).(map[string]bool)
}
func (f *FakeLicensing) FeatureEnabled(feature string) bool {
mockedArgs := f.Called(feature)
return mockedArgs.Get(0).(bool)
}