Documentation ¶
Overview ¶
package antidigtest provides utilities used by dig internally to test its own functionality.
Index ¶
- type Container
- func (c *Container) RequireDecorate(f interface{}, opts ...dig.DecorateOption)
- func (c *Container) RequireInvoke(f interface{}, opts ...dig.InvokeOption)
- func (c *Container) RequireProvide(f interface{}, opts ...dig.ProvideOption)
- func (c *Container) Scope(name string, opts ...dig.ScopeOption) *Scope
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
Container wraps dig.Container to provide methods for easier testing.
func (*Container) RequireDecorate ¶
func (c *Container) RequireDecorate(f interface{}, opts ...dig.DecorateOption)
RequireDecorate decorates the scope using the given function, halting the test if it fails.
func (*Container) RequireInvoke ¶
func (c *Container) RequireInvoke(f interface{}, opts ...dig.InvokeOption)
RequireInvoke invokes the given function to the container, halting the test if it fails.
func (*Container) RequireProvide ¶
func (c *Container) RequireProvide(f interface{}, opts ...dig.ProvideOption)
RequireProvide provides the given function to the container, halting the test if it fails.
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope wraps dig.Scope to provide methods for easier testing.
func (*Scope) RequireDecorate ¶
func (s *Scope) RequireDecorate(f interface{}, opts ...dig.DecorateOption)
RequireDecorate decorates the scope using the given function, halting the test if it fails.
func (*Scope) RequireInvoke ¶
func (s *Scope) RequireInvoke(f interface{}, opts ...dig.InvokeOption)
RequireInvoke invokes the given function to the scope, halting the test if it fails.
func (*Scope) RequireProvide ¶
func (s *Scope) RequireProvide(f interface{}, opts ...dig.ProvideOption)
RequireProvide provides the given function to the scope, halting the test if it fails.