package app import ( "testing" "time" "github.com/gochat/gochat/internal/config" ) func safeCall_Cov3(fn func()) { defer func() { _ = recover() }(); fn() } func TestNew_NilConfig_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = New(nil) }) } func TestNew_EmptyConfig_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = New(&config.Config{}) }) } func TestApp_Run_Nil_Cov3(t *testing.T) { a := &App{} safeCall_Cov3(func() { _ = a.Run() }) } func TestApp_Shutdown_Nil_Cov3(t *testing.T) { a := &App{} safeCall_Cov3(func() { _ = a.Shutdown(time.Second) }) } func TestInitDB_Nil_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = initDB(nil) }) } func TestAutoMigrate_Nil_Cov3(t *testing.T) { safeCall_Cov3(func() { _ = autoMigrate(nil) }) } func TestNewDatabase_Empty_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = NewDatabase(&config.DatabaseConfig{}, "") }) } func TestNewRedisClient_Empty_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = NewRedisClient(&config.RedisConfig{}) }) } func TestBootstrap_Empty_Cov3(t *testing.T) { safeCall_Cov3(func() { _, _ = Bootstrap("") }) }