Documentation ¶
Index ¶
- func RestAPTestCaseFactory(t *testing.T) func(config *RestAPITestCaseConfig) RestAPITestCase
- func RestMockTestCaseFactory(t *testing.T) func(name string, request RestMockTestCaseRequest, ...) RestMockTestCase
- func SendFile(t *testing.T, router router.IRouter, path string, fileName string) models.File
- type ErrorHolder
- type RestAPITestCase
- type RestAPITestCaseConfig
- type RestMockTestCase
- type RestMockTestCaseRequest
- type RestMockTestCaseResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestAPTestCaseFactory ¶
func RestAPTestCaseFactory(t *testing.T) func(config *RestAPITestCaseConfig) RestAPITestCase
RestAPTestCaseFactory HTTP configuration: Request and Response
func RestMockTestCaseFactory ¶
func RestMockTestCaseFactory(t *testing.T) func(name string, request RestMockTestCaseRequest, response RestMockTestCaseResponse) RestMockTestCase
RestMockTestCaseFactory HTTP configuration: Request and Response
Types ¶
type ErrorHolder ¶
type ErrorHolder struct {
// contains filtered or unexported fields
}
ErrorHolder Error Holder object
func (*ErrorHolder) Group ¶
func (holder *ErrorHolder) Group(groupName string) func(message string, level int) *errorGroup
Group Error Holder creationg group
func (*ErrorHolder) HasErrors ¶
func (holder *ErrorHolder) HasErrors() bool
HasErrors Error Holder has errors
type RestAPITestCase ¶
type RestAPITestCase struct { RestAPITestCaseConfig // contains filtered or unexported fields }
RestAPITestCase HTTP Test Case
func (*RestAPITestCase) AssertEquals ¶
func (testCase *RestAPITestCase) AssertEquals(response *httptest.ResponseRecorder)
AssertEquals checking Router Response
func (RestAPITestCase) TransformToHTTPResponseRequest ¶
func (testCase RestAPITestCase) TransformToHTTPResponseRequest() (*httptest.ResponseRecorder, *http.Request)
TransformToHTTPResponseRequest Generate Request and Response for Router
type RestAPITestCaseConfig ¶
type RestAPITestCaseConfig struct { Name string Method string Status int URI string RequestFile string RequestFileIsSource bool ResponseFile string ExpectedResponse interface{} ActualResponse interface{} }
RestAPITestCaseConfig HTTP Test Case Config
type RestMockTestCase ¶
type RestMockTestCase struct {
// contains filtered or unexported fields
}
RestMockTestCase HTTP Test Case
func (*RestMockTestCase) AssertEquals ¶
func (testCase *RestMockTestCase) AssertEquals(response *httptest.ResponseRecorder)
AssertEquals checking Router Response
func (RestMockTestCase) TransformToHTTPResponseRequest ¶
func (testCase RestMockTestCase) TransformToHTTPResponseRequest() (*httptest.ResponseRecorder, *http.Request)
TransformToHTTPResponseRequest Generate Request and Response for Router
Click to show internal directories.
Click to hide internal directories.