-
Notifications
You must be signed in to change notification settings - Fork 1
/
accounting_client_fake.go
41 lines (32 loc) · 1.74 KB
/
accounting_client_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
package modzy
import (
"context"
)
// AccountingClientFake is meant to help in mocking the AccountingClient interface easily for unit testing.
type AccountingClientFake struct {
GetEntitlementsFunc func(ctx context.Context) (*GetEntitlementsOutput, error)
HasEntitlementFunc func(ctx context.Context, entitlement string) (bool, error)
GetLicenseFunc func(ctx context.Context) (*GetLicenseOutput, error)
ListAccountingUsersFunc func(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error)
ListProjectsFunc func(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error)
GetProjectDetailsFunc func(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error)
}
var _ AccountingClient = &AccountingClientFake{}
func (c *AccountingClientFake) GetEntitlements(ctx context.Context) (*GetEntitlementsOutput, error) {
return c.GetEntitlementsFunc(ctx)
}
func (c *AccountingClientFake) HasEntitlement(ctx context.Context, entitlement string) (bool, error) {
return c.HasEntitlementFunc(ctx, entitlement)
}
func (c *AccountingClientFake) GetLicense(ctx context.Context) (*GetLicenseOutput, error) {
return c.GetLicenseFunc(ctx)
}
func (c *AccountingClientFake) ListAccountingUsers(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error) {
return c.ListAccountingUsersFunc(ctx, input)
}
func (c *AccountingClientFake) ListProjects(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error) {
return c.ListProjectsFunc(ctx, input)
}
func (c *AccountingClientFake) GetProjectDetails(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error) {
return c.GetProjectDetailsFunc(ctx, input)
}