2023-10-24 17:03:04 +02:00
|
|
|
package create_files
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestFindSingularName(t *testing.T) {
|
2024-09-06 14:10:00 +02:00
|
|
|
Otvet := Find_SingularName("lawsuit_status_types")
|
2023-10-24 17:03:04 +02:00
|
|
|
if Otvet == "" {
|
|
|
|
t.Error("TestFindSingularName() error: Otvet =''")
|
|
|
|
}
|
|
|
|
}
|
2023-10-27 10:43:15 +02:00
|
|
|
|
|
|
|
func TestFormatName(t *testing.T) {
|
2023-11-02 14:57:13 +02:00
|
|
|
Name := "document_invoice_id"
|
2023-10-27 10:43:15 +02:00
|
|
|
Otvet := FormatName(Name)
|
|
|
|
if Otvet == "" {
|
|
|
|
t.Error("TestFormatName() error")
|
|
|
|
}
|
|
|
|
}
|
2023-11-02 14:57:13 +02:00
|
|
|
|
|
|
|
func TestDeleteLineWithComment(t *testing.T) {
|
|
|
|
s := `import (
|
2023-12-27 13:28:11 +02:00
|
|
|
"github.com/ManyakRus/starter/config_main"
|
2023-11-10 12:28:58 +02:00
|
|
|
"github.com/ManyakRus/starter/postgres_gorm"
|
2023-11-02 14:57:13 +02:00
|
|
|
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
|
|
|
|
"testing"
|
|
|
|
//TestFind_ByExtID() "gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/constants"
|
|
|
|
)
|
|
|
|
`
|
|
|
|
Otvet := DeleteLineWithComment(s, "TestFind_ByExtID")
|
|
|
|
if Otvet == "" {
|
|
|
|
t.Error("TestFormatName() error")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestPrintableString(t *testing.T) {
|
|
|
|
s := `123 // \\ 456
|
|
|
|
789`
|
|
|
|
Otvet := PrintableString(s)
|
|
|
|
if Otvet == "" {
|
|
|
|
t.Error("TestPrintableString() error: Otvet = ''")
|
|
|
|
}
|
|
|
|
}
|