hunter/hunter_test.go

20 lines
267 B
Go
Raw Normal View History

2020-04-07 18:55:41 +08:00
package hunter
2020-04-08 01:18:33 +08:00
import (
"testing"
)
2020-04-07 18:55:41 +08:00
2020-04-08 01:18:33 +08:00
type Web struct {
}
2020-04-07 18:55:41 +08:00
2020-04-08 01:18:33 +08:00
func (web Web) Execute(cxt *TaskContext) {
cxt.SetShare("123", 123)
}
func TestCase1(t *testing.T) {
hunter := NewHunter()
hunter.AddTask(&Web{})
hunter.Execute()
t.Error(hunter.cxt.GetShare("123"))
2020-04-07 18:55:41 +08:00
}