forked from goplus/yap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgop_autogen_test.go
39 lines (36 loc) · 970 Bytes
/
gop_autogen_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Code generated by gop (Go+); DO NOT EDIT.
package main
import (
"github.com/goplus/yap/ytest"
"github.com/qiniu/x/stringutil"
"testing"
)
type case_foo struct {
ytest.CaseApp
}
//line ytest/demo/basic/foo_ytest.gox:1
func (this *case_foo) Main() {
//line ytest/demo/basic/foo_ytest.gox:1:1
server := new(foo)
//line ytest/demo/basic/foo_ytest.gox:2:1
server.Main()
//line ytest/demo/basic/foo_ytest.gox:3:1
this.RunMock("foo.com", server)
//line ytest/demo/basic/foo_ytest.gox:5:1
this.Run("get /p/$id", func() {
//line ytest/demo/basic/foo_ytest.gox:6:1
id := "123"
//line ytest/demo/basic/foo_ytest.gox:7:1
this.Get(stringutil.Concat("http://foo.com/p/", id))
//line ytest/demo/basic/foo_ytest.gox:8:1
this.RetWith(200)
//line ytest/demo/basic/foo_ytest.gox:9:1
this.Json(map[string]string{"id": id})
})
}
func (this *case_foo) Classfname() string {
return "foo"
}
func Test_foo(t *testing.T) {
ytest.Gopt_CaseApp_TestMain(new(case_foo), t)
}