fixture

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fixture provides pre-filled entities and props for tests, so test cases only have to state the fields they actually care about.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BarcodeProp

func BarcodeProp() props.Barcode

BarcodeProp is responsible to give a valid props.Barcode.

func CellEntity

func CellEntity() entity.Cell

CellEntity is responsible to give a valid entity.Cell.

func CellProp

func CellProp() props.Cell

CellProp is responsible to give a valid props.Cell.

func CheckboxProp

func CheckboxProp() props.Checkbox

CheckboxProp is responsible to give a valid props.Checkbox.

func ColorProp

func ColorProp() props.Color

ColorProp is responsible to give a valid props.Color.

func ConfigEntity

func ConfigEntity() entity.Config

ConfigEntity is responsible to give a valid entity.Config.

func FontProp

func FontProp() props.Font

FontProp is responsible to give a valid props.Font.

func ImageEntity

func ImageEntity() entity.Image

ImageEntity is responsible to give a valid entity.Image.

func LineProp

func LineProp() props.Line

LineProp is responsible to give a valid props.Line.

func MarginsEntity

func MarginsEntity() entity.Margins

MarginsEntity is responsible to give a valid entity.Margins.

func PageProp

func PageProp() props.PageNumber

PageProp is responsible to give a valid props.PageNumber.

func RectProp

func RectProp() props.Rect

RectProp is responsible to give a valid props.Rect.

func SignatureProp

func SignatureProp() props.Signature

SignatureProp is responsible to give a valid props.Signature.

func TextProp

func TextProp() props.Text

TextProp is responsible to give a valid props.Text.

Types

type TestFont

type TestFont struct {
	Family string
	Style  fontstyle.Type
	File   string
	Bytes  []byte
}

TestFont is a stand-in font for tests, returning fixed values instead of reading a real font file.

func (TestFont) GetBytes

func (t TestFont) GetBytes() []byte

GetBytes returns the embedded font bytes.

func (TestFont) GetFamily

func (t TestFont) GetFamily() string

GetFamily returns the font family name.

func (TestFont) GetFile

func (t TestFont) GetFile() string

GetFile returns the font file path.

func (TestFont) GetStyle

func (t TestFont) GetStyle() fontstyle.Type

GetStyle returns the font style.

Jump to

Keyboard shortcuts

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