This repository has been archived on 2022-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
elon-eats-my-tweets/generated/mocks/TwitterAPIClient.go

96 lines
2.1 KiB
Go
Raw Normal View History

2022-05-20 22:34:20 +00:00
// Code generated by mockery v2.12.2. DO NOT EDIT.
package mocks
import (
testing "testing"
mock "github.com/stretchr/testify/mock"
2022-05-24 19:20:28 +00:00
twitterapi "git.netflux.io/rob/elon-eats-my-tweets/twitterapi"
2022-05-20 22:34:20 +00:00
)
2022-05-24 19:20:28 +00:00
// TwitterAPIClient is an autogenerated mock type for the APIClient type
2022-05-20 22:34:20 +00:00
type TwitterAPIClient struct {
mock.Mock
}
2022-05-24 19:20:28 +00:00
// GetLastTweet provides a mock function with given fields: _a0
func (_m *TwitterAPIClient) GetLastTweet(_a0 string) (*twitterapi.Tweet, error) {
ret := _m.Called(_a0)
var r0 *twitterapi.Tweet
if rf, ok := ret.Get(0).(func(string) *twitterapi.Tweet); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*twitterapi.Tweet)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
2022-05-20 22:34:20 +00:00
// GetMe provides a mock function with given fields:
2022-05-24 19:20:28 +00:00
func (_m *TwitterAPIClient) GetMe() (*twitterapi.User, error) {
2022-05-20 22:34:20 +00:00
ret := _m.Called()
2022-05-24 19:20:28 +00:00
var r0 *twitterapi.User
if rf, ok := ret.Get(0).(func() *twitterapi.User); ok {
2022-05-20 22:34:20 +00:00
r0 = rf()
} else {
if ret.Get(0) != nil {
2022-05-24 19:20:28 +00:00
r0 = ret.Get(0).(*twitterapi.User)
2022-05-20 22:34:20 +00:00
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
2022-05-24 19:20:28 +00:00
// GetTweets provides a mock function with given fields: _a0, _a1
func (_m *TwitterAPIClient) GetTweets(_a0 string, _a1 string) ([]*twitterapi.Tweet, error) {
ret := _m.Called(_a0, _a1)
var r0 []*twitterapi.Tweet
if rf, ok := ret.Get(0).(func(string, string) []*twitterapi.Tweet); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*twitterapi.Tweet)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
2022-05-20 22:34:20 +00:00
// NewTwitterAPIClient creates a new instance of TwitterAPIClient. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func NewTwitterAPIClient(t testing.TB) *TwitterAPIClient {
mock := &TwitterAPIClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}