mirror of
https://github.com/stretchr/testify.git
synced 2025-05-31 11:42:44 +00:00
Change to use godoc
This commit is contained in:
parent
056e9e6bfa
commit
43b2ef12b3
12
doc.go
12
doc.go
@ -5,19 +5,7 @@
|
||||
//
|
||||
// The assert package provides a comprehensive set of assertion functions that tie in to the Go testing system.
|
||||
//
|
||||
// The http package contains tools to make it easier to test http activity using the Go testing system.
|
||||
//
|
||||
// The mock package provides a system by which it is possible to mock your objects and verify calls are happening as expected.
|
||||
//
|
||||
// The suite package provides a basic structure for using structs as testing suites, and methods on those structs as tests. It includes setup/teardown functionality in the way of interfaces.
|
||||
package testify
|
||||
|
||||
// blank imports help docs.
|
||||
import (
|
||||
// assert package
|
||||
_ "github.com/stretchr/testify/assert"
|
||||
// http package
|
||||
_ "github.com/stretchr/testify/http"
|
||||
// mock package
|
||||
_ "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
@ -1,2 +1,2 @@
|
||||
// Deprecated: Use net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
package http
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
type TestResponseWriter struct {
|
||||
|
||||
// StatusCode is the last int written by the call to WriteHeader(int)
|
||||
@ -17,7 +17,7 @@ type TestResponseWriter struct {
|
||||
header http.Header
|
||||
}
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
func (rw *TestResponseWriter) Header() http.Header {
|
||||
|
||||
if rw.header == nil {
|
||||
@ -27,7 +27,7 @@ func (rw *TestResponseWriter) Header() http.Header {
|
||||
return rw.header
|
||||
}
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
|
||||
|
||||
// assume 200 success if no header has been set
|
||||
@ -43,7 +43,7 @@ func (rw *TestResponseWriter) Write(bytes []byte) (int, error) {
|
||||
|
||||
}
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
func (rw *TestResponseWriter) WriteHeader(i int) {
|
||||
rw.StatusCode = i
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
type TestRoundTripper struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// Deprecated: Use https://pkg.go.dev/net/http/httptest instead.
|
||||
// Deprecated: Use [net/http/httptest] instead.
|
||||
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
args := t.Called(req)
|
||||
return args.Get(0).(*http.Response), args.Error(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user