integration

package
v0.0.0-...-c0b2d83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlogPostsToInterfaceSlice

func BlogPostsToInterfaceSlice(posts []BlogPost) []interface{}

BlogPostsToInterfaceSlice converts a []BlogPost to []interface{} for comparison tests.

func TestArrayCommandMethods

func TestArrayCommandMethods(t *testing.T)

TestArrayCommandMethods tests array command methods like .last, .first, and .size.

Types

type BlogPost

type BlogPost struct {
	Title         string
	Author        string
	Content       string
	CreatedAt     time.Time
	URL           string
	CommentsCount int
	Published     bool
	Rating        float64
}

BlogPost represents a blog post with various properties for testing slice type compatibility.

func NewBlogPost

func NewBlogPost(title, author, content, url string, createdAt time.Time, commentsCount int, published bool, rating float64) BlogPost

NewBlogPost creates a new BlogPost with the given values.

func SampleBlogPosts

func SampleBlogPosts() []BlogPost

SampleBlogPosts returns a slice of sample BlogPost instances for testing.

type BooleanDrop

type BooleanDrop struct {
	*liquid.Drop
	// contains filtered or unexported fields
}

BooleanDrop is a drop that wraps a boolean value.

func NewBooleanDrop

func NewBooleanDrop(value bool) *BooleanDrop

NewBooleanDrop creates a new BooleanDrop.

func (*BooleanDrop) String

func (b *BooleanDrop) String() string

String returns the string representation.

func (*BooleanDrop) ToLiquidValue

func (b *BooleanDrop) ToLiquidValue() interface{}

ToLiquidValue returns the boolean value.

type ContextProxyDrop

type ContextProxyDrop struct {
	*liquid.Drop
}

ContextProxyDrop is a proxy for context access.

func (*ContextProxyDrop) LiquidMethodMissing

func (c *ContextProxyDrop) LiquidMethodMissing(method string) interface{}

LiquidMethodMissing handles missing method calls by looking up in context.

type DropWithUndefinedMethod

type DropWithUndefinedMethod struct {
	*liquid.Drop
}

DropWithUndefinedMethod is a drop with a foo method but missing other methods.

func NewDropWithUndefinedMethod

func NewDropWithUndefinedMethod() *DropWithUndefinedMethod

NewDropWithUndefinedMethod creates a new DropWithUndefinedMethod.

func (*DropWithUndefinedMethod) Foo

func (d *DropWithUndefinedMethod) Foo() interface{}

Foo returns "foo".

type ErrorDrop

type ErrorDrop struct {
	*liquid.Drop
}

ErrorDrop is a drop that raises various types of errors for testing.

func NewErrorDrop

func NewErrorDrop() *ErrorDrop

NewErrorDrop creates a new ErrorDrop.

func (*ErrorDrop) ArgumentError

func (e *ErrorDrop) ArgumentError() interface{}

ArgumentError raises an ArgumentError.

func (*ErrorDrop) Exception

func (e *ErrorDrop) Exception() interface{}

Exception raises a generic exception.

func (*ErrorDrop) RuntimeError

func (e *ErrorDrop) RuntimeError() interface{}

RuntimeError raises a runtime error.

func (*ErrorDrop) StandardError

func (e *ErrorDrop) StandardError() interface{}

StandardError raises a StandardError.

func (*ErrorDrop) SyntaxError

func (e *ErrorDrop) SyntaxError() interface{}

SyntaxError raises a SyntaxError.

type IntegerDrop

type IntegerDrop struct {
	*liquid.Drop
	// contains filtered or unexported fields
}

IntegerDrop is a drop that wraps an integer value.

func NewIntegerDrop

func NewIntegerDrop(value interface{}) *IntegerDrop

NewIntegerDrop creates a new IntegerDrop.

func (*IntegerDrop) String

func (i *IntegerDrop) String() string

String returns the string representation.

func (*IntegerDrop) ToLiquidValue

func (i *IntegerDrop) ToLiquidValue() interface{}

ToLiquidValue returns the integer value.

type SettingsDrop

type SettingsDrop struct {
	*liquid.Drop
	// contains filtered or unexported fields
}

SettingsDrop is a drop that provides settings access.

func NewSettingsDrop

func NewSettingsDrop(settings map[string]interface{}) *SettingsDrop

NewSettingsDrop creates a new SettingsDrop.

func (*SettingsDrop) LiquidMethodMissing

func (s *SettingsDrop) LiquidMethodMissing(key string) interface{}

LiquidMethodMissing handles missing method calls.

type SomethingWithLength

type SomethingWithLength struct {
	*liquid.Drop
}

SomethingWithLength is a drop with a length method that returns nil.

func NewSomethingWithLength

func NewSomethingWithLength() *SomethingWithLength

NewSomethingWithLength creates a new SomethingWithLength.

func (*SomethingWithLength) Length

func (s *SomethingWithLength) Length() interface{}

Length returns nil.

type StringDrop

type StringDrop struct {
	*liquid.Drop
	// contains filtered or unexported fields
}

StringDrop is a drop that wraps a string value.

func NewStringDrop

func NewStringDrop(value string) *StringDrop

NewStringDrop creates a new StringDrop.

func (*StringDrop) String

func (s *StringDrop) String() string

String returns the string representation.

func (*StringDrop) ToLiquidValue

func (s *StringDrop) ToLiquidValue() interface{}

ToLiquidValue returns the string value.

type TemplateContextDrop

type TemplateContextDrop struct {
	*liquid.Drop
}

TemplateContextDrop is a drop that can access the template context.

func NewTemplateContextDrop

func NewTemplateContextDrop() *TemplateContextDrop

NewTemplateContextDrop creates a new TemplateContextDrop.

func (*TemplateContextDrop) Baz

func (t *TemplateContextDrop) Baz() interface{}

Baz returns a value from registers.

func (*TemplateContextDrop) Foo

func (t *TemplateContextDrop) Foo() interface{}

Foo returns a test value.

func (*TemplateContextDrop) LiquidMethodMissing

func (t *TemplateContextDrop) LiquidMethodMissing(method string) interface{}

LiquidMethodMissing handles missing method calls by looking up in context.

func (*TemplateContextDrop) LoopPos

func (t *TemplateContextDrop) LoopPos() interface{}

LoopPos returns the current forloop index.

func (*TemplateContextDrop) Scopes

func (t *TemplateContextDrop) Scopes() interface{}

Scopes returns the number of scopes in the context.

type ThingWithToLiquid

type ThingWithToLiquid struct{}

ThingWithToLiquid is a test type that implements ToLiquid.

func (*ThingWithToLiquid) ToLiquid

func (t *ThingWithToLiquid) ToLiquid() interface{}

ToLiquid returns a liquid representation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL