MCPcopy Create free account
hub / github.com/codnect/chrono / TestSimpleTriggerContext

Function TestSimpleTriggerContext

trigger_test.go:9–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestSimpleTriggerContext(t *testing.T) {
10 ctx := NewSimpleTriggerContext()
11 now := time.Now()
12 ctx.lastExecutionTime = now
13 ctx.lastTriggeredExecutionTime = now
14 ctx.lastCompletionTime = now
15
16 assert.Equal(t, now, ctx.LastExecutionTime())
17 assert.Equal(t, now, ctx.LastCompletionTime())
18 assert.Equal(t, now, ctx.LastTriggeredExecutionTime())
19}
20
21func TestNewCronTrigger(t *testing.T) {
22 trigger, err := CreateCronTrigger("", time.Local)

Callers

nothing calls this directly

Calls 4

LastExecutionTimeMethod · 0.95
LastCompletionTimeMethod · 0.95
NewSimpleTriggerContextFunction · 0.85

Tested by

no test coverage detected