github.com/argoproj/argo-cd/v2@v2.10.9/test/e2e/fixture/notification/context.go (about) 1 package notification 2 3 import ( 4 "testing" 5 6 "github.com/argoproj/argo-cd/v2/test/e2e/fixture" 7 ) 8 9 // this implements the "given" part of given/when/then 10 type Context struct { 11 t *testing.T 12 } 13 14 func Given(t *testing.T) *Context { 15 fixture.EnsureCleanState(t) 16 return &Context{t: t} 17 } 18 19 func (c *Context) And(block func()) *Context { 20 block() 21 return c 22 } 23 24 func (c *Context) When() *Actions { 25 return &Actions{context: c} 26 }