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

Method TestContextNextNestedError

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

Source from the content-addressed store, hash-verified

93}
94
95func (s *SuiteCommon) TestContextNextNestedError(c *C) {
96 mA := &TestMiddlewareAltA{}
97 mB := &TestMiddlewareAltB{}
98 mC := &TestMiddlewareAltC{}
99 mA.Nested, mB.Nested, mC.Nested = true, true, true
100 mA.Stop = errors.New("foo")
101
102 j := &TestJob{}
103 j.Use(mA, mB, mC)
104
105 e := NewExecution()
106
107 h := NewScheduler(&TestLogger{})
108 ctx := NewContext(h, j, e)
109 ctx.Start()
110
111 err := ctx.Next()
112 c.Assert(err, IsNil)
113 c.Assert(mA.Called, Equals, 1)
114 c.Assert(mB.Called, Equals, 0)
115 c.Assert(mC.Called, Equals, 0)
116 c.Assert(j.Called, Equals, 0)
117}
118
119func (s *SuiteCommon) TestContextNextContinueOnStop(c *C) {
120 mA := &TestMiddlewareAltA{}

Callers

nothing calls this directly

Calls 6

StartMethod · 0.95
NextMethod · 0.95
NewExecutionFunction · 0.85
NewSchedulerFunction · 0.85
NewContextFunction · 0.85
UseMethod · 0.65

Tested by

no test coverage detected