MCPcopy
hub / github.com/mcuadros/ofelia / TestNewContext

Method TestNewContext

core/common_test.go:18–30  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

16var _ = Suite(&SuiteCommon{})
17
18func (s *SuiteCommon) TestNewContext(c *C) {
19 h := NewScheduler(&TestLogger{})
20 j := &TestJob{}
21 j.Use(&TestMiddleware{})
22
23 e := NewExecution()
24
25 ctx := NewContext(h, j, e)
26 c.Assert(ctx.Scheduler, DeepEquals, h)
27 c.Assert(ctx.Job, DeepEquals, j)
28 c.Assert(ctx.Execution, DeepEquals, e)
29 c.Assert(ctx.middlewares, HasLen, 1)
30}
31
32func (s *SuiteCommon) TestContextNextError(c *C) {
33 mA := &TestMiddlewareAltA{}

Callers

nothing calls this directly

Calls 4

NewSchedulerFunction · 0.85
NewExecutionFunction · 0.85
NewContextFunction · 0.85
UseMethod · 0.65

Tested by

no test coverage detected