Documentation
      ¶
    
    
  
    
  
    Index ¶
- func AssertClauseSerialize(t *testing.T, dialect jet.Dialect, clause jet.Serializer, query string, ...)
 - func AssertClauseSerializeErr(t *testing.T, dialect jet.Dialect, clause jet.Serializer, errString string)
 - func AssertDebugStatementSql(t *testing.T, query jet.Statement, expectedQuery string, ...)
 - func AssertExec(t *testing.T, stmt jet.Statement, db qrm.DB, rowsAffected ...int64)
 - func AssertExecErr(t *testing.T, stmt jet.Statement, db qrm.DB, errorStr string)
 - func AssertFileContent(t *testing.T, filePath string, contentBegin string, expectedContent string)
 - func AssertFileNamesEqual(t *testing.T, fileInfos []os.FileInfo, fileNames ...string)
 - func AssertJSON(t *testing.T, data interface{}, expectedJSON string)
 - func AssertJSONFile(t *testing.T, data interface{}, testRelativePath string)
 - func AssertProjectionSerialize(t *testing.T, dialect jet.Dialect, projection jet.Projection, query string, ...)
 - func AssertQueryPanicErr(t *testing.T, stmt jet.Statement, db qrm.DB, dest interface{}, ...)
 - func AssertStatementSql(t *testing.T, query jet.Statement, expectedQuery string, ...)
 - func AssertStatementSqlErr(t *testing.T, stmt jet.Statement, errorStr string)
 - func Date(t string) *time.Time
 - func PrintJson(v interface{})
 - func SaveJSONFile(v interface{}, testRelativePath string)
 - func TimeWithTimeZone(t string) *time.Time
 - func TimeWithoutTimeZone(t string) *time.Time
 - func TimestampWithTimeZone(t string, precision int) *time.Time
 - func TimestampWithoutTimeZone(t string, precision int) *time.Time
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertClauseSerialize ¶
func AssertClauseSerialize(t *testing.T, dialect jet.Dialect, clause jet.Serializer, query string, args ...interface{})
AssertClauseSerialize checks if clause serialize produces expected query and args
func AssertClauseSerializeErr ¶
func AssertClauseSerializeErr(t *testing.T, dialect jet.Dialect, clause jet.Serializer, errString string)
AssertClauseSerializeErr check if clause serialize panics with errString
func AssertDebugStatementSql ¶
func AssertDebugStatementSql(t *testing.T, query jet.Statement, expectedQuery string, expectedArgs ...interface{})
AssertDebugStatementSql check if statement Sql() is the same as expectedQuery
func AssertExec ¶
AssertExec assert statement execution for successful execution and number of rows affected
func AssertExecErr ¶
AssertExecErr assert statement execution for failed execution with error string errorStr
func AssertFileContent ¶
AssertFileContent check if file content at filePath contains expectedContent text.
func AssertFileNamesEqual ¶
AssertFileNamesEqual check if all filesInfos are contained in fileNames
func AssertJSON ¶
AssertJSON check if data json output is the same as expectedJSON
func AssertJSONFile ¶
AssertJSONFile check if data json representation is the same as json at testRelativePath
func AssertProjectionSerialize ¶
func AssertProjectionSerialize(t *testing.T, dialect jet.Dialect, projection jet.Projection, query string, args ...interface{})
AssertProjectionSerialize check if projection serialize produces expected query and args
func AssertQueryPanicErr ¶
func AssertQueryPanicErr(t *testing.T, stmt jet.Statement, db qrm.DB, dest interface{}, errString string)
AssertQueryPanicErr check if statement Query execution panics with error errString
func AssertStatementSql ¶
func AssertStatementSql(t *testing.T, query jet.Statement, expectedQuery string, expectedArgs ...interface{})
AssertStatementSql check if statement Sql() is the same as expectedQuery and expectedArgs
func AssertStatementSqlErr ¶
AssertStatementSqlErr checks if statement Sql() panics with errorStr
func SaveJSONFile ¶
func SaveJSONFile(v interface{}, testRelativePath string)
    SaveJSONFile saves v as json at testRelativePath
func TimeWithTimeZone ¶
TimeWithTimeZone creates time from t
func TimeWithoutTimeZone ¶
TimeWithoutTimeZone creates time from t
func TimestampWithTimeZone ¶
TimestampWithTimeZone creates time from t
Types ¶
This section is empty.
      
      Source Files
      ¶
    
- test_utils.go
 - time_utils.go