test

package
v1.32.2-hotfix.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInput

type CreateInput struct {
	UserID string
	Create *dataSource.Create
}

type CreateOutput

type CreateOutput struct {
	Source *dataSource.Source
	Error  error
}

type DestroyAllOutput added in v1.31.0

type DestroyAllOutput struct {
	Destroyed bool
	Error     error
}

type DestroyInput added in v1.31.0

type DestroyInput struct {
	ID        string
	Condition *request.Condition
}

type DestroyOutput added in v1.31.0

type DestroyOutput struct {
	Destroyed bool
	Error     error
}

type GetOutput

type GetOutput struct {
	Source *dataSource.Source
	Error  error
}

type ListInput

type ListInput struct {
	UserID     string
	Filter     *dataSource.Filter
	Pagination *page.Pagination
}

type ListOutput

type ListOutput struct {
	SourceArray dataSource.SourceArray
	Error       error
}

type Session

type Session struct {
	*test.Closer
	ListInvocations       int
	ListInputs            []ListInput
	ListStub              func(ctx context.Context, userID string, filter *dataSource.Filter, pagination *page.Pagination) (dataSource.SourceArray, error)
	ListOutputs           []ListOutput
	ListOutput            *ListOutput
	CreateInvocations     int
	CreateInputs          []CreateInput
	CreateStub            func(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, error)
	CreateOutputs         []CreateOutput
	CreateOutput          *CreateOutput
	DestroyAllInvocations int
	DestroyAllInputs      []string
	DestroyAllStub        func(ctx context.Context, userID string) (bool, error)
	DestroyAllOutputs     []DestroyAllOutput
	DestroyAllOutput      *DestroyAllOutput
	GetInvocations        int
	GetInputs             []string
	GetStub               func(ctx context.Context, id string) (*dataSource.Source, error)
	GetOutputs            []GetOutput
	GetOutput             *GetOutput
	UpdateInvocations     int
	UpdateInputs          []UpdateInput
	UpdateStub            func(ctx context.Context, id string, condition *request.Condition, create *dataSource.Update) (*dataSource.Source, error)
	UpdateOutputs         []UpdateOutput
	UpdateOutput          *UpdateOutput
	DestroyInvocations    int
	DestroyInputs         []DestroyInput
	DestroyStub           func(ctx context.Context, id string, condition *request.Condition) (bool, error)
	DestroyOutputs        []DestroyOutput
	DestroyOutput         *DestroyOutput
}

func NewSession

func NewSession() *Session

func (*Session) AssertOutputsEmpty

func (s *Session) AssertOutputsEmpty()

func (*Session) Create

func (s *Session) Create(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, error)

func (*Session) Destroy added in v1.31.0

func (s *Session) Destroy(ctx context.Context, id string, condition *request.Condition) (bool, error)

func (*Session) DestroyAll added in v1.31.0

func (s *Session) DestroyAll(ctx context.Context, userID string) (bool, error)

func (*Session) Get

func (s *Session) Get(ctx context.Context, id string) (*dataSource.Source, error)

func (*Session) List

func (s *Session) List(ctx context.Context, userID string, filter *dataSource.Filter, pagination *page.Pagination) (dataSource.SourceArray, error)

func (*Session) Update

func (s *Session) Update(ctx context.Context, id string, condition *request.Condition, update *dataSource.Update) (*dataSource.Source, error)

type Store

type Store struct {
	NewSessionInvocations int
	NewSessionStub        func() dataSourceStoreStructured.Session
	NewSessionOutputs     []dataSourceStoreStructured.Session
	NewSessionOutput      *dataSourceStoreStructured.Session
}

func NewStore

func NewStore() *Store

func (*Store) AssertOutputsEmpty

func (s *Store) AssertOutputsEmpty()

func (*Store) NewSession

func (s *Store) NewSession() dataSourceStoreStructured.Session

type UpdateInput

type UpdateInput struct {
	ID        string
	Condition *request.Condition
	Update    *dataSource.Update
}

type UpdateOutput

type UpdateOutput struct {
	Source *dataSource.Source
	Error  error
}

Jump to

Keyboard shortcuts

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