testing

package
v0.0.0-...-b2761b6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2014 License: GPL-3.0, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package bus/testing provides an implementation of bus.Bus and bus.Endpoint suitable for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallArgs

func GetCallArgs(tc bus.Endpoint) []callArgs

GetCallArgs returns a list of the arguments for each Call() invocation.

func NewMultiValuedTestingBus

func NewMultiValuedTestingBus(dialTC condition.Interface, callTC condition.Interface, retvalses ...[]interface{}) bus.Bus

Build a bus.Bus that takes a condition to determine whether it should work, as well as a condition and a series of lists of return values for the testing bus.Endpoint it builds.

func NewMultiValuedTestingEndpoint

func NewMultiValuedTestingEndpoint(dialCond condition.Interface, callCond condition.Interface, retvalses ...[]interface{}) bus.Endpoint

Build a bus.Endpoint that calls OK() on its condition before returning the provided return values.

NOTE: Call() always returns the first return value; Watch() will provide each of them in turn, irrespective of whether Call has been called.

func NewTestingBus

func NewTestingBus(dialTC condition.Interface, callTC condition.Interface, retvals ...interface{}) bus.Bus

Build a bus.Bus that takes a condition to determine whether it should work, as well as a condition and series of return values for the testing bus.Endpoint it builds.

func NewTestingEndpoint

func NewTestingEndpoint(dialCond condition.Interface, callCond condition.Interface, retvals ...interface{}) bus.Endpoint

func SetWatchTicker

func SetWatchTicker(tc bus.Endpoint, watchTicker chan bool)

If SetWatchTicker is called with a non-nil watchTicker, it is used instead of the default timeout to wait while sending values over WatchSignal. Set it to nil again to restore default behaviour.

Types

This section is empty.

Jump to

Keyboard shortcuts

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