示例#1
0
func TestValidCode(t *testing.T) {
	s, err := DefaultDoc.GetStatusCode("200")

	assert.Nil(t, err)
	assert.Equal(t, s.Code, "200")
	assert.Equal(t, s.Text, "OK")
}
示例#2
0
// Nil asserts that the specified object is nil.
//
//    require.Nil(t, err, "err should be nothing")
func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
	if !assert.Nil(t, object, msgAndArgs...) {
		t.FailNow()
	}
}