Documentation
¶
Overview ¶
Package mocks contains mock types for all interfaces.
mocks are generated by mockery.
Index ¶
- type MockObjecter
- type MockOperationValidationBuilder
- func (mock *MockOperationValidationBuilder) SetCollectionFormat(collectionFormat string)
- func (mock *MockOperationValidationBuilder) SetCollectionFormatCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetDefault(defaultValue any)
- func (mock *MockOperationValidationBuilder) SetDefaultCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetEnum(enumValue string)
- func (mock *MockOperationValidationBuilder) SetEnumCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetExample(example any)
- func (mock *MockOperationValidationBuilder) SetExampleCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMaxItems(maxItems int64)
- func (mock *MockOperationValidationBuilder) SetMaxItemsCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMaxLength(maxLength int64)
- func (mock *MockOperationValidationBuilder) SetMaxLengthCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMaximum(maxium float64, isExclusive bool)
- func (mock *MockOperationValidationBuilder) SetMaximumCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMinItems(minItems int64)
- func (mock *MockOperationValidationBuilder) SetMinItemsCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMinLength(minLength int64)
- func (mock *MockOperationValidationBuilder) SetMinLengthCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMinimum(minimum float64, isExclusive bool)
- func (mock *MockOperationValidationBuilder) SetMinimumCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetMultipleOf(multiple float64)
- func (mock *MockOperationValidationBuilder) SetMultipleOfCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetPattern(pattern string)
- func (mock *MockOperationValidationBuilder) SetPatternCalls() []struct{ ... }
- func (mock *MockOperationValidationBuilder) SetUnique(isUniqueItems bool)
- func (mock *MockOperationValidationBuilder) SetUniqueCalls() []struct{ ... }
- type MockSwaggerTypable
- func (mock *MockSwaggerTypable) AddExtension(key string, value any)
- func (mock *MockSwaggerTypable) AddExtensionCalls() []struct{ ... }
- func (mock *MockSwaggerTypable) In() string
- func (mock *MockSwaggerTypable) InCalls() []struct{}
- func (mock *MockSwaggerTypable) Items() ifaces.SwaggerTypable
- func (mock *MockSwaggerTypable) ItemsCalls() []struct{}
- func (mock *MockSwaggerTypable) Level() int
- func (mock *MockSwaggerTypable) LevelCalls() []struct{}
- func (mock *MockSwaggerTypable) Schema() *spec.Schema
- func (mock *MockSwaggerTypable) SchemaCalls() []struct{}
- func (mock *MockSwaggerTypable) SetRef(ref spec.Ref)
- func (mock *MockSwaggerTypable) SetRefCalls() []struct{ ... }
- func (mock *MockSwaggerTypable) Typed(swaggerType string, format string)
- func (mock *MockSwaggerTypable) TypedCalls() []struct{ ... }
- func (mock *MockSwaggerTypable) WithEnum(values ...any)
- func (mock *MockSwaggerTypable) WithEnumCalls() []struct{ ... }
- func (mock *MockSwaggerTypable) WithEnumDescription(desc string)
- func (mock *MockSwaggerTypable) WithEnumDescriptionCalls() []struct{ ... }
- type MockValidationBuilder
- func (mock *MockValidationBuilder) SetDefault(defaultValue any)
- func (mock *MockValidationBuilder) SetDefaultCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetEnum(enumValue string)
- func (mock *MockValidationBuilder) SetEnumCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetExample(example any)
- func (mock *MockValidationBuilder) SetExampleCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMaxItems(maxItems int64)
- func (mock *MockValidationBuilder) SetMaxItemsCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMaxLength(maxLength int64)
- func (mock *MockValidationBuilder) SetMaxLengthCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMaximum(maxium float64, isExclusive bool)
- func (mock *MockValidationBuilder) SetMaximumCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMinItems(minItems int64)
- func (mock *MockValidationBuilder) SetMinItemsCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMinLength(minLength int64)
- func (mock *MockValidationBuilder) SetMinLengthCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMinimum(minimum float64, isExclusive bool)
- func (mock *MockValidationBuilder) SetMinimumCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetMultipleOf(multiple float64)
- func (mock *MockValidationBuilder) SetMultipleOfCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetPattern(pattern string)
- func (mock *MockValidationBuilder) SetPatternCalls() []struct{ ... }
- func (mock *MockValidationBuilder) SetUnique(isUniqueItems bool)
- func (mock *MockValidationBuilder) SetUniqueCalls() []struct{ ... }
- type MockValueParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockObjecter ¶
type MockObjecter struct {
// ObjFunc mocks the Obj method.
ObjFunc func() *types.TypeName
// contains filtered or unexported fields
}
MockObjecter is a mock implementation of ifaces.Objecter.
func TestSomethingThatUsesObjecter(t *testing.T) {
// make and configure a mocked ifaces.Objecter
mockedObjecter := &MockObjecter{
ObjFunc: func() *types.TypeName {
panic("mock out the Obj method")
},
}
// use mockedObjecter in code that requires ifaces.Objecter
// and then make assertions.
}
func (*MockObjecter) ObjCalls ¶
func (mock *MockObjecter) ObjCalls() []struct { }
ObjCalls gets all the calls that were made to Obj. Check the length with:
len(mockedObjecter.ObjCalls())
type MockOperationValidationBuilder ¶
type MockOperationValidationBuilder struct {
// SetCollectionFormatFunc mocks the SetCollectionFormat method.
SetCollectionFormatFunc func(collectionFormat string)
// SetDefaultFunc mocks the SetDefault method.
SetDefaultFunc func(defaultValue any)
// SetEnumFunc mocks the SetEnum method.
SetEnumFunc func(enumValue string)
// SetExampleFunc mocks the SetExample method.
SetExampleFunc func(example any)
// SetMaxItemsFunc mocks the SetMaxItems method.
SetMaxItemsFunc func(maxItems int64)
// SetMaxLengthFunc mocks the SetMaxLength method.
SetMaxLengthFunc func(maxLength int64)
// SetMaximumFunc mocks the SetMaximum method.
SetMaximumFunc func(maxium float64, isExclusive bool)
// SetMinItemsFunc mocks the SetMinItems method.
SetMinItemsFunc func(minItems int64)
// SetMinLengthFunc mocks the SetMinLength method.
SetMinLengthFunc func(minLength int64)
// SetMinimumFunc mocks the SetMinimum method.
SetMinimumFunc func(minimum float64, isExclusive bool)
// SetMultipleOfFunc mocks the SetMultipleOf method.
SetMultipleOfFunc func(multiple float64)
// SetPatternFunc mocks the SetPattern method.
SetPatternFunc func(pattern string)
// SetUniqueFunc mocks the SetUnique method.
SetUniqueFunc func(isUniqueItems bool)
// contains filtered or unexported fields
}
MockOperationValidationBuilder is a mock implementation of ifaces.OperationValidationBuilder.
func TestSomethingThatUsesOperationValidationBuilder(t *testing.T) {
// make and configure a mocked ifaces.OperationValidationBuilder
mockedOperationValidationBuilder := &MockOperationValidationBuilder{
SetCollectionFormatFunc: func(collectionFormat string) {
panic("mock out the SetCollectionFormat method")
},
SetDefaultFunc: func(defaultValue any) {
panic("mock out the SetDefault method")
},
SetEnumFunc: func(enumValue string) {
panic("mock out the SetEnum method")
},
SetExampleFunc: func(example any) {
panic("mock out the SetExample method")
},
SetMaxItemsFunc: func(maxItems int64) {
panic("mock out the SetMaxItems method")
},
SetMaxLengthFunc: func(maxLength int64) {
panic("mock out the SetMaxLength method")
},
SetMaximumFunc: func(maxium float64, isExclusive bool) {
panic("mock out the SetMaximum method")
},
SetMinItemsFunc: func(minItems int64) {
panic("mock out the SetMinItems method")
},
SetMinLengthFunc: func(minLength int64) {
panic("mock out the SetMinLength method")
},
SetMinimumFunc: func(minimum float64, isExclusive bool) {
panic("mock out the SetMinimum method")
},
SetMultipleOfFunc: func(multiple float64) {
panic("mock out the SetMultipleOf method")
},
SetPatternFunc: func(pattern string) {
panic("mock out the SetPattern method")
},
SetUniqueFunc: func(isUniqueItems bool) {
panic("mock out the SetUnique method")
},
}
// use mockedOperationValidationBuilder in code that requires ifaces.OperationValidationBuilder
// and then make assertions.
}
func (*MockOperationValidationBuilder) SetCollectionFormat ¶
func (mock *MockOperationValidationBuilder) SetCollectionFormat(collectionFormat string)
SetCollectionFormat calls SetCollectionFormatFunc.
func (*MockOperationValidationBuilder) SetCollectionFormatCalls ¶
func (mock *MockOperationValidationBuilder) SetCollectionFormatCalls() []struct { CollectionFormat string }
SetCollectionFormatCalls gets all the calls that were made to SetCollectionFormat. Check the length with:
len(mockedOperationValidationBuilder.SetCollectionFormatCalls())
func (*MockOperationValidationBuilder) SetDefault ¶
func (mock *MockOperationValidationBuilder) SetDefault(defaultValue any)
SetDefault calls SetDefaultFunc.
func (*MockOperationValidationBuilder) SetDefaultCalls ¶
func (mock *MockOperationValidationBuilder) SetDefaultCalls() []struct { DefaultValue any }
SetDefaultCalls gets all the calls that were made to SetDefault. Check the length with:
len(mockedOperationValidationBuilder.SetDefaultCalls())
func (*MockOperationValidationBuilder) SetEnum ¶
func (mock *MockOperationValidationBuilder) SetEnum(enumValue string)
SetEnum calls SetEnumFunc.
func (*MockOperationValidationBuilder) SetEnumCalls ¶
func (mock *MockOperationValidationBuilder) SetEnumCalls() []struct { EnumValue string }
SetEnumCalls gets all the calls that were made to SetEnum. Check the length with:
len(mockedOperationValidationBuilder.SetEnumCalls())
func (*MockOperationValidationBuilder) SetExample ¶
func (mock *MockOperationValidationBuilder) SetExample(example any)
SetExample calls SetExampleFunc.
func (*MockOperationValidationBuilder) SetExampleCalls ¶
func (mock *MockOperationValidationBuilder) SetExampleCalls() []struct { Example any }
SetExampleCalls gets all the calls that were made to SetExample. Check the length with:
len(mockedOperationValidationBuilder.SetExampleCalls())
func (*MockOperationValidationBuilder) SetMaxItems ¶
func (mock *MockOperationValidationBuilder) SetMaxItems(maxItems int64)
SetMaxItems calls SetMaxItemsFunc.
func (*MockOperationValidationBuilder) SetMaxItemsCalls ¶
func (mock *MockOperationValidationBuilder) SetMaxItemsCalls() []struct { MaxItems int64 }
SetMaxItemsCalls gets all the calls that were made to SetMaxItems. Check the length with:
len(mockedOperationValidationBuilder.SetMaxItemsCalls())
func (*MockOperationValidationBuilder) SetMaxLength ¶
func (mock *MockOperationValidationBuilder) SetMaxLength(maxLength int64)
SetMaxLength calls SetMaxLengthFunc.
func (*MockOperationValidationBuilder) SetMaxLengthCalls ¶
func (mock *MockOperationValidationBuilder) SetMaxLengthCalls() []struct { MaxLength int64 }
SetMaxLengthCalls gets all the calls that were made to SetMaxLength. Check the length with:
len(mockedOperationValidationBuilder.SetMaxLengthCalls())
func (*MockOperationValidationBuilder) SetMaximum ¶
func (mock *MockOperationValidationBuilder) SetMaximum(maxium float64, isExclusive bool)
SetMaximum calls SetMaximumFunc.
func (*MockOperationValidationBuilder) SetMaximumCalls ¶
func (mock *MockOperationValidationBuilder) SetMaximumCalls() []struct { Maxium float64 IsExclusive bool }
SetMaximumCalls gets all the calls that were made to SetMaximum. Check the length with:
len(mockedOperationValidationBuilder.SetMaximumCalls())
func (*MockOperationValidationBuilder) SetMinItems ¶
func (mock *MockOperationValidationBuilder) SetMinItems(minItems int64)
SetMinItems calls SetMinItemsFunc.
func (*MockOperationValidationBuilder) SetMinItemsCalls ¶
func (mock *MockOperationValidationBuilder) SetMinItemsCalls() []struct { MinItems int64 }
SetMinItemsCalls gets all the calls that were made to SetMinItems. Check the length with:
len(mockedOperationValidationBuilder.SetMinItemsCalls())
func (*MockOperationValidationBuilder) SetMinLength ¶
func (mock *MockOperationValidationBuilder) SetMinLength(minLength int64)
SetMinLength calls SetMinLengthFunc.
func (*MockOperationValidationBuilder) SetMinLengthCalls ¶
func (mock *MockOperationValidationBuilder) SetMinLengthCalls() []struct { MinLength int64 }
SetMinLengthCalls gets all the calls that were made to SetMinLength. Check the length with:
len(mockedOperationValidationBuilder.SetMinLengthCalls())
func (*MockOperationValidationBuilder) SetMinimum ¶
func (mock *MockOperationValidationBuilder) SetMinimum(minimum float64, isExclusive bool)
SetMinimum calls SetMinimumFunc.
func (*MockOperationValidationBuilder) SetMinimumCalls ¶
func (mock *MockOperationValidationBuilder) SetMinimumCalls() []struct { Minimum float64 IsExclusive bool }
SetMinimumCalls gets all the calls that were made to SetMinimum. Check the length with:
len(mockedOperationValidationBuilder.SetMinimumCalls())
func (*MockOperationValidationBuilder) SetMultipleOf ¶
func (mock *MockOperationValidationBuilder) SetMultipleOf(multiple float64)
SetMultipleOf calls SetMultipleOfFunc.
func (*MockOperationValidationBuilder) SetMultipleOfCalls ¶
func (mock *MockOperationValidationBuilder) SetMultipleOfCalls() []struct { Multiple float64 }
SetMultipleOfCalls gets all the calls that were made to SetMultipleOf. Check the length with:
len(mockedOperationValidationBuilder.SetMultipleOfCalls())
func (*MockOperationValidationBuilder) SetPattern ¶
func (mock *MockOperationValidationBuilder) SetPattern(pattern string)
SetPattern calls SetPatternFunc.
func (*MockOperationValidationBuilder) SetPatternCalls ¶
func (mock *MockOperationValidationBuilder) SetPatternCalls() []struct { Pattern string }
SetPatternCalls gets all the calls that were made to SetPattern. Check the length with:
len(mockedOperationValidationBuilder.SetPatternCalls())
func (*MockOperationValidationBuilder) SetUnique ¶
func (mock *MockOperationValidationBuilder) SetUnique(isUniqueItems bool)
SetUnique calls SetUniqueFunc.
func (*MockOperationValidationBuilder) SetUniqueCalls ¶
func (mock *MockOperationValidationBuilder) SetUniqueCalls() []struct { IsUniqueItems bool }
SetUniqueCalls gets all the calls that were made to SetUnique. Check the length with:
len(mockedOperationValidationBuilder.SetUniqueCalls())
type MockSwaggerTypable ¶
type MockSwaggerTypable struct {
// AddExtensionFunc mocks the AddExtension method.
AddExtensionFunc func(key string, value any)
// InFunc mocks the In method.
InFunc func() string
// ItemsFunc mocks the Items method.
ItemsFunc func() ifaces.SwaggerTypable
// LevelFunc mocks the Level method.
LevelFunc func() int
// SchemaFunc mocks the Schema method.
SchemaFunc func() *spec.Schema
// SetRefFunc mocks the SetRef method.
SetRefFunc func(ref spec.Ref)
// TypedFunc mocks the Typed method.
TypedFunc func(swaggerType string, format string)
// WithEnumFunc mocks the WithEnum method.
WithEnumFunc func(values ...any)
// WithEnumDescriptionFunc mocks the WithEnumDescription method.
WithEnumDescriptionFunc func(desc string)
// contains filtered or unexported fields
}
MockSwaggerTypable is a mock implementation of ifaces.SwaggerTypable.
func TestSomethingThatUsesSwaggerTypable(t *testing.T) {
// make and configure a mocked ifaces.SwaggerTypable
mockedSwaggerTypable := &MockSwaggerTypable{
AddExtensionFunc: func(key string, value any) {
panic("mock out the AddExtension method")
},
InFunc: func() string {
panic("mock out the In method")
},
ItemsFunc: func() ifaces.SwaggerTypable {
panic("mock out the Items method")
},
LevelFunc: func() int {
panic("mock out the Level method")
},
SchemaFunc: func() *spec.Schema {
panic("mock out the Schema method")
},
SetRefFunc: func(ref spec.Ref) {
panic("mock out the SetRef method")
},
TypedFunc: func(swaggerType string, format string) {
panic("mock out the Typed method")
},
WithEnumFunc: func(values ...any) {
panic("mock out the WithEnum method")
},
WithEnumDescriptionFunc: func(desc string) {
panic("mock out the WithEnumDescription method")
},
}
// use mockedSwaggerTypable in code that requires ifaces.SwaggerTypable
// and then make assertions.
}
func (*MockSwaggerTypable) AddExtension ¶
func (mock *MockSwaggerTypable) AddExtension(key string, value any)
AddExtension calls AddExtensionFunc.
func (*MockSwaggerTypable) AddExtensionCalls ¶
func (mock *MockSwaggerTypable) AddExtensionCalls() []struct { Key string Value any }
AddExtensionCalls gets all the calls that were made to AddExtension. Check the length with:
len(mockedSwaggerTypable.AddExtensionCalls())
func (*MockSwaggerTypable) InCalls ¶
func (mock *MockSwaggerTypable) InCalls() []struct { }
InCalls gets all the calls that were made to In. Check the length with:
len(mockedSwaggerTypable.InCalls())
func (*MockSwaggerTypable) Items ¶
func (mock *MockSwaggerTypable) Items() ifaces.SwaggerTypable
Items calls ItemsFunc.
func (*MockSwaggerTypable) ItemsCalls ¶
func (mock *MockSwaggerTypable) ItemsCalls() []struct { }
ItemsCalls gets all the calls that were made to Items. Check the length with:
len(mockedSwaggerTypable.ItemsCalls())
func (*MockSwaggerTypable) Level ¶
func (mock *MockSwaggerTypable) Level() int
Level calls LevelFunc.
func (*MockSwaggerTypable) LevelCalls ¶
func (mock *MockSwaggerTypable) LevelCalls() []struct { }
LevelCalls gets all the calls that were made to Level. Check the length with:
len(mockedSwaggerTypable.LevelCalls())
func (*MockSwaggerTypable) Schema ¶
func (mock *MockSwaggerTypable) Schema() *spec.Schema
Schema calls SchemaFunc.
func (*MockSwaggerTypable) SchemaCalls ¶
func (mock *MockSwaggerTypable) SchemaCalls() []struct { }
SchemaCalls gets all the calls that were made to Schema. Check the length with:
len(mockedSwaggerTypable.SchemaCalls())
func (*MockSwaggerTypable) SetRef ¶
func (mock *MockSwaggerTypable) SetRef(ref spec.Ref)
SetRef calls SetRefFunc.
func (*MockSwaggerTypable) SetRefCalls ¶
func (mock *MockSwaggerTypable) SetRefCalls() []struct { Ref spec.Ref }
SetRefCalls gets all the calls that were made to SetRef. Check the length with:
len(mockedSwaggerTypable.SetRefCalls())
func (*MockSwaggerTypable) Typed ¶
func (mock *MockSwaggerTypable) Typed(swaggerType string, format string)
Typed calls TypedFunc.
func (*MockSwaggerTypable) TypedCalls ¶
func (mock *MockSwaggerTypable) TypedCalls() []struct { SwaggerType string Format string }
TypedCalls gets all the calls that were made to Typed. Check the length with:
len(mockedSwaggerTypable.TypedCalls())
func (*MockSwaggerTypable) WithEnum ¶
func (mock *MockSwaggerTypable) WithEnum(values ...any)
WithEnum calls WithEnumFunc.
func (*MockSwaggerTypable) WithEnumCalls ¶
func (mock *MockSwaggerTypable) WithEnumCalls() []struct { Values []any }
WithEnumCalls gets all the calls that were made to WithEnum. Check the length with:
len(mockedSwaggerTypable.WithEnumCalls())
func (*MockSwaggerTypable) WithEnumDescription ¶
func (mock *MockSwaggerTypable) WithEnumDescription(desc string)
WithEnumDescription calls WithEnumDescriptionFunc.
func (*MockSwaggerTypable) WithEnumDescriptionCalls ¶
func (mock *MockSwaggerTypable) WithEnumDescriptionCalls() []struct { Desc string }
WithEnumDescriptionCalls gets all the calls that were made to WithEnumDescription. Check the length with:
len(mockedSwaggerTypable.WithEnumDescriptionCalls())
type MockValidationBuilder ¶
type MockValidationBuilder struct {
// SetDefaultFunc mocks the SetDefault method.
SetDefaultFunc func(defaultValue any)
// SetEnumFunc mocks the SetEnum method.
SetEnumFunc func(enumValue string)
// SetExampleFunc mocks the SetExample method.
SetExampleFunc func(example any)
// SetMaxItemsFunc mocks the SetMaxItems method.
SetMaxItemsFunc func(maxItems int64)
// SetMaxLengthFunc mocks the SetMaxLength method.
SetMaxLengthFunc func(maxLength int64)
// SetMaximumFunc mocks the SetMaximum method.
SetMaximumFunc func(maxium float64, isExclusive bool)
// SetMinItemsFunc mocks the SetMinItems method.
SetMinItemsFunc func(minItems int64)
// SetMinLengthFunc mocks the SetMinLength method.
SetMinLengthFunc func(minLength int64)
// SetMinimumFunc mocks the SetMinimum method.
SetMinimumFunc func(minimum float64, isExclusive bool)
// SetMultipleOfFunc mocks the SetMultipleOf method.
SetMultipleOfFunc func(multiple float64)
// SetPatternFunc mocks the SetPattern method.
SetPatternFunc func(pattern string)
// SetUniqueFunc mocks the SetUnique method.
SetUniqueFunc func(isUniqueItems bool)
// contains filtered or unexported fields
}
MockValidationBuilder is a mock implementation of ifaces.ValidationBuilder.
func TestSomethingThatUsesValidationBuilder(t *testing.T) {
// make and configure a mocked ifaces.ValidationBuilder
mockedValidationBuilder := &MockValidationBuilder{
SetDefaultFunc: func(defaultValue any) {
panic("mock out the SetDefault method")
},
SetEnumFunc: func(enumValue string) {
panic("mock out the SetEnum method")
},
SetExampleFunc: func(example any) {
panic("mock out the SetExample method")
},
SetMaxItemsFunc: func(maxItems int64) {
panic("mock out the SetMaxItems method")
},
SetMaxLengthFunc: func(maxLength int64) {
panic("mock out the SetMaxLength method")
},
SetMaximumFunc: func(maxium float64, isExclusive bool) {
panic("mock out the SetMaximum method")
},
SetMinItemsFunc: func(minItems int64) {
panic("mock out the SetMinItems method")
},
SetMinLengthFunc: func(minLength int64) {
panic("mock out the SetMinLength method")
},
SetMinimumFunc: func(minimum float64, isExclusive bool) {
panic("mock out the SetMinimum method")
},
SetMultipleOfFunc: func(multiple float64) {
panic("mock out the SetMultipleOf method")
},
SetPatternFunc: func(pattern string) {
panic("mock out the SetPattern method")
},
SetUniqueFunc: func(isUniqueItems bool) {
panic("mock out the SetUnique method")
},
}
// use mockedValidationBuilder in code that requires ifaces.ValidationBuilder
// and then make assertions.
}
func (*MockValidationBuilder) SetDefault ¶
func (mock *MockValidationBuilder) SetDefault(defaultValue any)
SetDefault calls SetDefaultFunc.
func (*MockValidationBuilder) SetDefaultCalls ¶
func (mock *MockValidationBuilder) SetDefaultCalls() []struct { DefaultValue any }
SetDefaultCalls gets all the calls that were made to SetDefault. Check the length with:
len(mockedValidationBuilder.SetDefaultCalls())
func (*MockValidationBuilder) SetEnum ¶
func (mock *MockValidationBuilder) SetEnum(enumValue string)
SetEnum calls SetEnumFunc.
func (*MockValidationBuilder) SetEnumCalls ¶
func (mock *MockValidationBuilder) SetEnumCalls() []struct { EnumValue string }
SetEnumCalls gets all the calls that were made to SetEnum. Check the length with:
len(mockedValidationBuilder.SetEnumCalls())
func (*MockValidationBuilder) SetExample ¶
func (mock *MockValidationBuilder) SetExample(example any)
SetExample calls SetExampleFunc.
func (*MockValidationBuilder) SetExampleCalls ¶
func (mock *MockValidationBuilder) SetExampleCalls() []struct { Example any }
SetExampleCalls gets all the calls that were made to SetExample. Check the length with:
len(mockedValidationBuilder.SetExampleCalls())
func (*MockValidationBuilder) SetMaxItems ¶
func (mock *MockValidationBuilder) SetMaxItems(maxItems int64)
SetMaxItems calls SetMaxItemsFunc.
func (*MockValidationBuilder) SetMaxItemsCalls ¶
func (mock *MockValidationBuilder) SetMaxItemsCalls() []struct { MaxItems int64 }
SetMaxItemsCalls gets all the calls that were made to SetMaxItems. Check the length with:
len(mockedValidationBuilder.SetMaxItemsCalls())
func (*MockValidationBuilder) SetMaxLength ¶
func (mock *MockValidationBuilder) SetMaxLength(maxLength int64)
SetMaxLength calls SetMaxLengthFunc.
func (*MockValidationBuilder) SetMaxLengthCalls ¶
func (mock *MockValidationBuilder) SetMaxLengthCalls() []struct { MaxLength int64 }
SetMaxLengthCalls gets all the calls that were made to SetMaxLength. Check the length with:
len(mockedValidationBuilder.SetMaxLengthCalls())
func (*MockValidationBuilder) SetMaximum ¶
func (mock *MockValidationBuilder) SetMaximum(maxium float64, isExclusive bool)
SetMaximum calls SetMaximumFunc.
func (*MockValidationBuilder) SetMaximumCalls ¶
func (mock *MockValidationBuilder) SetMaximumCalls() []struct { Maxium float64 IsExclusive bool }
SetMaximumCalls gets all the calls that were made to SetMaximum. Check the length with:
len(mockedValidationBuilder.SetMaximumCalls())
func (*MockValidationBuilder) SetMinItems ¶
func (mock *MockValidationBuilder) SetMinItems(minItems int64)
SetMinItems calls SetMinItemsFunc.
func (*MockValidationBuilder) SetMinItemsCalls ¶
func (mock *MockValidationBuilder) SetMinItemsCalls() []struct { MinItems int64 }
SetMinItemsCalls gets all the calls that were made to SetMinItems. Check the length with:
len(mockedValidationBuilder.SetMinItemsCalls())
func (*MockValidationBuilder) SetMinLength ¶
func (mock *MockValidationBuilder) SetMinLength(minLength int64)
SetMinLength calls SetMinLengthFunc.
func (*MockValidationBuilder) SetMinLengthCalls ¶
func (mock *MockValidationBuilder) SetMinLengthCalls() []struct { MinLength int64 }
SetMinLengthCalls gets all the calls that were made to SetMinLength. Check the length with:
len(mockedValidationBuilder.SetMinLengthCalls())
func (*MockValidationBuilder) SetMinimum ¶
func (mock *MockValidationBuilder) SetMinimum(minimum float64, isExclusive bool)
SetMinimum calls SetMinimumFunc.
func (*MockValidationBuilder) SetMinimumCalls ¶
func (mock *MockValidationBuilder) SetMinimumCalls() []struct { Minimum float64 IsExclusive bool }
SetMinimumCalls gets all the calls that were made to SetMinimum. Check the length with:
len(mockedValidationBuilder.SetMinimumCalls())
func (*MockValidationBuilder) SetMultipleOf ¶
func (mock *MockValidationBuilder) SetMultipleOf(multiple float64)
SetMultipleOf calls SetMultipleOfFunc.
func (*MockValidationBuilder) SetMultipleOfCalls ¶
func (mock *MockValidationBuilder) SetMultipleOfCalls() []struct { Multiple float64 }
SetMultipleOfCalls gets all the calls that were made to SetMultipleOf. Check the length with:
len(mockedValidationBuilder.SetMultipleOfCalls())
func (*MockValidationBuilder) SetPattern ¶
func (mock *MockValidationBuilder) SetPattern(pattern string)
SetPattern calls SetPatternFunc.
func (*MockValidationBuilder) SetPatternCalls ¶
func (mock *MockValidationBuilder) SetPatternCalls() []struct { Pattern string }
SetPatternCalls gets all the calls that were made to SetPattern. Check the length with:
len(mockedValidationBuilder.SetPatternCalls())
func (*MockValidationBuilder) SetUnique ¶
func (mock *MockValidationBuilder) SetUnique(isUniqueItems bool)
SetUnique calls SetUniqueFunc.
func (*MockValidationBuilder) SetUniqueCalls ¶
func (mock *MockValidationBuilder) SetUniqueCalls() []struct { IsUniqueItems bool }
SetUniqueCalls gets all the calls that were made to SetUnique. Check the length with:
len(mockedValidationBuilder.SetUniqueCalls())
type MockValueParser ¶
type MockValueParser struct {
// MatchesFunc mocks the Matches method.
MatchesFunc func(commentLine string) bool
// ParseFunc mocks the Parse method.
ParseFunc func(commentlines []string) error
// contains filtered or unexported fields
}
MockValueParser is a mock implementation of ifaces.ValueParser.
func TestSomethingThatUsesValueParser(t *testing.T) {
// make and configure a mocked ifaces.ValueParser
mockedValueParser := &MockValueParser{
MatchesFunc: func(commentLine string) bool {
panic("mock out the Matches method")
},
ParseFunc: func(commentlines []string) error {
panic("mock out the Parse method")
},
}
// use mockedValueParser in code that requires ifaces.ValueParser
// and then make assertions.
}
func (*MockValueParser) Matches ¶
func (mock *MockValueParser) Matches(commentLine string) bool
Matches calls MatchesFunc.
func (*MockValueParser) MatchesCalls ¶
func (mock *MockValueParser) MatchesCalls() []struct { CommentLine string }
MatchesCalls gets all the calls that were made to Matches. Check the length with:
len(mockedValueParser.MatchesCalls())
func (*MockValueParser) Parse ¶
func (mock *MockValueParser) Parse(commentlines []string) error
Parse calls ParseFunc.
func (*MockValueParser) ParseCalls ¶
func (mock *MockValueParser) ParseCalls() []struct { Commentlines []string }
ParseCalls gets all the calls that were made to Parse. Check the length with:
len(mockedValueParser.ParseCalls())