Documentation
¶
Overview ¶
Package taskstest holds an in-memory task store and the contract suite every task store passes.
Index ¶
- Variables
- func Contract(t *testing.T, open func(t *testing.T) coretasks.Store)
- func Full(id task.ID) task.Task
- func InState(s string) task.State
- func ProjectsContract(t *testing.T, ...)
- func PropContract(t *testing.T, open func(t *testing.T) (coretasks.PropStore, func(task.ID)))
- type Projects
- type Props
- type Store
- func (s *Store) Apply(ctx context.Context, cs []task.Change, evs ...port.Event) error
- func (s *Store) Task(ctx context.Context, id task.ID) (task.Task, error)
- func (s *Store) Tasks(ctx context.Context, q task.Query) ([]task.Task, error)
- func (s *Store) TasksOf(ctx context.Context, u unit.Unit) ([]task.Task, error)
- func (s *Store) TasksSince(ctx context.Context, q task.Query, since coretasks.Since) (coretasks.Page, error)
Constants ¶
This section is empty.
Variables ¶
var BundledStates = bundledStates{}
BundledStates are the bundled profile's states and verb transitions, for tests that run the service with no profile at hand.
Functions ¶
func Contract ¶
Contract runs the behavior every coretasks.Store shares; open returns an empty store.
func ProjectsContract ¶
func ProjectsContract(t *testing.T, open func(t *testing.T) (coretasks.Store, coretasks.ProjectStore))
ProjectsContract is the suite every ProjectStore passes; open gives an empty task store and the project store over it.
Types ¶
type Projects ¶
type Projects struct {
// contains filtered or unexported fields
}
Projects is an in-memory coretasks.ProjectStore: the Review's runs.
func (*Projects) CurrentRun ¶
type Props ¶
type Props struct {
Writers map[task.ID]map[string]task.Writer
// contains filtered or unexported fields
}
Props is an in-memory coretasks.PropStore over the tasks Add names. Writers holds the writer of each property, by task and name.