hunter/hunter_test.go

20 lines
267 B
Go
Raw Normal View History

2020-04-07 10:55:41 +00:00
package hunter
2020-04-07 17:18:33 +00:00
import (
"testing"
)
2020-04-07 10:55:41 +00:00
2020-04-07 17:18:33 +00:00
type Web struct {
}
2020-04-07 10:55:41 +00:00
2020-04-07 17:18:33 +00: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 10:55:41 +00:00
}