cute
cute copied to clipboard
[Refactoring] Refactor Expect methods
Reimplement these methods like Require and Assert, e.g. ExpectJSONSchemaString => AssertJSONSchemaString and RequireJSONSchemaString
func (qt *cute) ExpectExecuteTimeout(t time.Duration) ExpectHTTPBuilder {
qt.tests[qt.countTests].Expect.ExecuteTime = t
return qt
}
func (qt *cute) ExpectStatus(code int) ExpectHTTPBuilder {
qt.tests[qt.countTests].Expect.Code = code
return qt
}
func (qt *cute) ExpectJSONSchemaString(schema string) ExpectHTTPBuilder {
qt.tests[qt.countTests].Expect.JSONSchema.String = schema
return qt
}
func (qt *cute) ExpectJSONSchemaByte(schema []byte) ExpectHTTPBuilder {
qt.tests[qt.countTests].Expect.JSONSchema.Byte = schema
return qt
}
func (qt *cute) ExpectJSONSchemaFile(filePath string) ExpectHTTPBuilder {
qt.tests[qt.countTests].Expect.JSONSchema.File = filePath
return qt
}