shortcuttest

package
v0.0.0-...-594fe3c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package shortcuttest has common code for tests of implementations of shortcut.Store.

Index

Constants

This section is empty.

Variables

View Source
var SubTests = map[string]SubTestFunction{
	"Shortcut_GetAll":         GetAll,
	"Shortcut_InsertGet":      InsertGet,
	"Shortcut_GetNonExistent": GetNonExistent,
	"Shortcut_DeleteShortcut": GetNonExistent,
}

SubTests are all the subtests we have for regression.Store.

Functions

func DeleteShortcut

func DeleteShortcut(t *testing.T, store shortcut.Store)

Shortcut_DeleteShortcut tests that DeleteShortcut removes the shortcut id.

func GetAll

func GetAll(t *testing.T, store shortcut.Store)

Shortcut_GetAll tests that GetAll produces a channel of all the shortcuts in the database.

func GetNonExistent

func GetNonExistent(t *testing.T, store shortcut.Store)

Shortcut_GetNonExistent tests that we fail when retrieving an unknown shortcut.

func InsertGet

func InsertGet(t *testing.T, store shortcut.Store)

Shortcut_InsertGet does the core testing of an instance of shortcut.Store.

Types

type SubTestFunction

type SubTestFunction func(t *testing.T, store shortcut.Store)

SubTestFunction is a func we will call to test one aspect of an implementation of regression.Store.

Jump to

Keyboard shortcuts

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