// Code generated by pegomock. DO NOT EDIT. // Source: github.com/derailed/k9s/internal/config (interfaces: KubeSettings) package config_test import ( pegomock "github.com/petergtz/pegomock" v1 "k8s.io/api/core/v1" "reflect" "time" ) type MockKubeSettings struct { fail func(message string, callerSkip ...int) } func NewMockKubeSettings() *MockKubeSettings { return &MockKubeSettings{fail: pegomock.GlobalFailHandler} } func (mock *MockKubeSettings) ClusterNames() ([]string, error) { if mock == nil { panic("mock must not be nil. Use myMock := NewMockKubeSettings().") } params := []pegomock.Param{} result := pegomock.GetGenericMockFrom(mock).Invoke("ClusterNames", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()}) var ret0 []string var ret1 error if len(result) != 0 { if result[0] != nil { ret0 = result[0].([]string) } if result[1] != nil { ret1 = result[1].(error) } } return ret0, ret1 } func (mock *MockKubeSettings) CurrentClusterName() (string, error) { if mock == nil { panic("mock must not be nil. Use myMock := NewMockKubeSettings().") } params := []pegomock.Param{} result := pegomock.GetGenericMockFrom(mock).Invoke("CurrentClusterName", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()}) var ret0 string var ret1 error if len(result) != 0 { if result[0] != nil { ret0 = result[0].(string) } if result[1] != nil { ret1 = result[1].(error) } } return ret0, ret1 } func (mock *MockKubeSettings) CurrentContextName() (string, error) { if mock == nil { panic("mock must not be nil. Use myMock := NewMockKubeSettings().") } params := []pegomock.Param{} result := pegomock.GetGenericMockFrom(mock).Invoke("CurrentContextName", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()}) var ret0 string var ret1 error if len(result) != 0 { if result[0] != nil { ret0 = result[0].(string) } if result[1] != nil { ret1 = result[1].(error) } } return ret0, ret1 } func (mock *MockKubeSettings) CurrentNamespaceName() (string, error) { if mock == nil { panic("mock must not be nil. Use myMock := NewMockKubeSettings().") } params := []pegomock.Param{} result := pegomock.GetGenericMockFrom(mock).Invoke("CurrentNamespaceName", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()}) var ret0 string var ret1 error if len(result) != 0 { if result[0] != nil { ret0 = result[0].(string) } if result[1] != nil { ret1 = result[1].(error) } } return ret0, ret1 } func (mock *MockKubeSettings) NamespaceNames(_param0 []v1.Namespace) []string { if mock == nil { panic("mock must not be nil. Use myMock := NewMockKubeSettings().") } params := []pegomock.Param{_param0} result := pegomock.GetGenericMockFrom(mock).Invoke("NamespaceNames", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem()}) var ret0 []string if len(result) != 0 { if result[0] != nil { ret0 = result[0].([]string) } } return ret0 } func (mock *MockKubeSettings) VerifyWasCalledOnce() *VerifierKubeSettings { return &VerifierKubeSettings{ mock: mock, invocationCountMatcher: pegomock.Times(1), } } func (mock *MockKubeSettings) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierKubeSettings { return &VerifierKubeSettings{ mock: mock, invocationCountMatcher: invocationCountMatcher, } } func (mock *MockKubeSettings) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierKubeSettings { return &VerifierKubeSettings{ mock: mock, invocationCountMatcher: invocationCountMatcher, inOrderContext: inOrderContext, } } func (mock *MockKubeSettings) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierKubeSettings { return &VerifierKubeSettings{ mock: mock, invocationCountMatcher: invocationCountMatcher, timeout: timeout, } } type VerifierKubeSettings struct { mock *MockKubeSettings invocationCountMatcher pegomock.Matcher inOrderContext *pegomock.InOrderContext timeout time.Duration } func (verifier *VerifierKubeSettings) ClusterNames() *KubeSettings_ClusterNames_OngoingVerification { params := []pegomock.Param{} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ClusterNames", params, verifier.timeout) return &KubeSettings_ClusterNames_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type KubeSettings_ClusterNames_OngoingVerification struct { mock *MockKubeSettings methodInvocations []pegomock.MethodInvocation } func (c *KubeSettings_ClusterNames_OngoingVerification) GetCapturedArguments() { } func (c *KubeSettings_ClusterNames_OngoingVerification) GetAllCapturedArguments() { } func (verifier *VerifierKubeSettings) CurrentClusterName() *KubeSettings_CurrentClusterName_OngoingVerification { params := []pegomock.Param{} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CurrentClusterName", params, verifier.timeout) return &KubeSettings_CurrentClusterName_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type KubeSettings_CurrentClusterName_OngoingVerification struct { mock *MockKubeSettings methodInvocations []pegomock.MethodInvocation } func (c *KubeSettings_CurrentClusterName_OngoingVerification) GetCapturedArguments() { } func (c *KubeSettings_CurrentClusterName_OngoingVerification) GetAllCapturedArguments() { } func (verifier *VerifierKubeSettings) CurrentContextName() *KubeSettings_CurrentContextName_OngoingVerification { params := []pegomock.Param{} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CurrentContextName", params, verifier.timeout) return &KubeSettings_CurrentContextName_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type KubeSettings_CurrentContextName_OngoingVerification struct { mock *MockKubeSettings methodInvocations []pegomock.MethodInvocation } func (c *KubeSettings_CurrentContextName_OngoingVerification) GetCapturedArguments() { } func (c *KubeSettings_CurrentContextName_OngoingVerification) GetAllCapturedArguments() { } func (verifier *VerifierKubeSettings) CurrentNamespaceName() *KubeSettings_CurrentNamespaceName_OngoingVerification { params := []pegomock.Param{} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CurrentNamespaceName", params, verifier.timeout) return &KubeSettings_CurrentNamespaceName_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type KubeSettings_CurrentNamespaceName_OngoingVerification struct { mock *MockKubeSettings methodInvocations []pegomock.MethodInvocation } func (c *KubeSettings_CurrentNamespaceName_OngoingVerification) GetCapturedArguments() { } func (c *KubeSettings_CurrentNamespaceName_OngoingVerification) GetAllCapturedArguments() { } func (verifier *VerifierKubeSettings) NamespaceNames(_param0 []v1.Namespace) *KubeSettings_NamespaceNames_OngoingVerification { params := []pegomock.Param{_param0} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "NamespaceNames", params, verifier.timeout) return &KubeSettings_NamespaceNames_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type KubeSettings_NamespaceNames_OngoingVerification struct { mock *MockKubeSettings methodInvocations []pegomock.MethodInvocation } func (c *KubeSettings_NamespaceNames_OngoingVerification) GetCapturedArguments() []v1.Namespace { _param0 := c.GetAllCapturedArguments() return _param0[len(_param0)-1] } func (c *KubeSettings_NamespaceNames_OngoingVerification) GetAllCapturedArguments() (_param0 [][]v1.Namespace) { params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations) if len(params) > 0 { _param0 = make([][]v1.Namespace, len(params[0])) for u, param := range params[0] { _param0[u] = param.([]v1.Namespace) } } return }