@@ -51,8 +51,8 @@ func TestContext(t *testing.T) {
5151 assert .Nil (t , c .Socket ())
5252
5353 // Param by id
54- c .Context ().pnames = []string {"id" }
55- c .Context ().pvalues = []string {"1" }
54+ c .Object ().pnames = []string {"id" }
55+ c .Object ().pvalues = []string {"1" }
5656 assert .Equal (t , "1" , c .P (0 ))
5757
5858 // Param by name
@@ -68,13 +68,13 @@ func TestContext(t *testing.T) {
6868
6969 // JSON
7070 testBindOk (t , c , ApplicationJSON )
71- c .Context ().request = test .NewRequest (POST , "/" , strings .NewReader (incorrectContent ))
71+ c .Object ().request = test .NewRequest (POST , "/" , strings .NewReader (incorrectContent ))
7272 testBindError (t , c , ApplicationJSON )
7373
7474 // XML
75- c .Context ().request = test .NewRequest (POST , "/" , strings .NewReader (userXML ))
75+ c .Object ().request = test .NewRequest (POST , "/" , strings .NewReader (userXML ))
7676 testBindOk (t , c , ApplicationXML )
77- c .Context ().request = test .NewRequest (POST , "/" , strings .NewReader (incorrectContent ))
77+ c .Object ().request = test .NewRequest (POST , "/" , strings .NewReader (incorrectContent ))
7878 testBindError (t , c , ApplicationXML )
7979
8080 // Unsupported
@@ -87,14 +87,14 @@ func TestContext(t *testing.T) {
8787 tpl := & Template {
8888 templates : template .Must (template .New ("hello" ).Parse ("Hello, {{.}}!" )),
8989 }
90- c .Context ().echo .SetRenderer (tpl )
90+ c .Object ().echo .SetRenderer (tpl )
9191 err := c .Render (http .StatusOK , "hello" , "Joe" )
9292 if assert .NoError (t , err ) {
9393 assert .Equal (t , http .StatusOK , rec .Status ())
9494 assert .Equal (t , "Hello, Joe!" , rec .Body .String ())
9595 }
9696
97- c .Context ().echo .renderer = nil
97+ c .Object ().echo .renderer = nil
9898 err = c .Render (http .StatusOK , "hello" , "Joe" )
9999 assert .Error (t , err )
100100
@@ -226,12 +226,12 @@ func TestContext(t *testing.T) {
226226
227227 // Error
228228 rec = test .NewResponseRecorder ()
229- c = NewContext (req , rec , e ).Context ()
229+ c = NewContext (req , rec , e ).Object ()
230230 c .Error (errors .New ("error" ))
231231 assert .Equal (t , http .StatusInternalServerError , c .Response ().Status ())
232232
233233 // reset
234- c .Context ().reset (req , test .NewResponseRecorder (), e )
234+ c .Object ().reset (req , test .NewResponseRecorder (), e )
235235}
236236
237237func TestContextPath (t * testing.T ) {
0 commit comments