Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
Mount func() // provoca el init: el renderer carga la lista
Labels func() []string // lo que la lista muestra ahora
Select func(id string) // simula seleccionar la fila con ese id
SetField func(name, value string) // fija un campo del form
Save func() // simula la acción guardar
Delete func() // simula la acción eliminar
}
Driver simula los eventos de UI sobre el renderer, sin que la suite conozca su tecnología.
type Factory ¶
Factory construye el renderer bajo prueba alrededor del presenter y devuelve un Driver que simula la interacción del usuario con él. Es el seam específico de tecnología (como ServeFunc en router).
type FakeCall ¶ added in v0.1.0
FakeCall records one invocation the suite (or a consumer's module test) can inspect.
type FakeCaller ¶ added in v0.1.0
type FakeCaller struct {
Calls []FakeCall
// Reply fills `into` with canned TYPED data for op (no serialization); nil = no result.
Reply func(op string, into model.Decodable)
// Err, if set, is what every Call reports (and suppresses Reply).
Err error
}
FakeCaller is a codec-free router.Caller test double. Unlike router/mock.Caller it does NOT decode a wire response — it fills the typed target directly via Reply — so this package (and any renderer or module that imports it for tests) depends only on model and router, never a codec. That is the same discipline router/conformance keeps: the arnés of a contract must not drag in an implementation.
type MockList ¶
type MockList struct {
// contains filtered or unexported fields
}
MockList es un tipo de lista que contiene registros de simulación.
func (*MockList) DecodeFields ¶
func (m *MockList) DecodeFields(r model.FieldReader)
DecodeFields implementa model.Decodable.
type MockRecord ¶
MockRecord es un modelo de simulación de un registro para el arnés de conformidad.
func (*MockRecord) DecodeFields ¶
func (m *MockRecord) DecodeFields(r model.FieldReader)
DecodeFields implementa model.Decodable.
func (*MockRecord) EncodeFields ¶
func (m *MockRecord) EncodeFields(w model.FieldWriter)
EncodeFields implementa model.Encodable.
func (*MockRecord) ModelName ¶
func (m *MockRecord) ModelName() string
ModelName implementa model.ModuleNaming.
func (*MockRecord) Pointers ¶
func (m *MockRecord) Pointers() []any
Pointers implementa model.Fielder.
func (*MockRecord) Schema ¶
func (m *MockRecord) Schema() []model.Field
Schema implementa model.Fielder.