Skip to content

Commit 7a4793f

Browse files
author
kmetin
committed
refactor
1 parent 6806991 commit 7a4793f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

base/commands/serializer/serializer_it_test.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package serializer
44

55
import (
6-
"fmt"
76
"os"
87
"path/filepath"
98
"testing"
@@ -39,11 +38,6 @@ var (
3938
)
4039

4140
func init() {
42-
UUIDGenFunc = func() types.UUID {
43-
return types.NewUUIDWith(10, 10)
44-
}
45-
s := types.NewUUIDWith(10, 10).String()
46-
fmt.Println(s)
4741
generationTestFilesDir := filepath.Join("testdata", "generationTestFiles")
4842
generationTestFilesSchemaDir := filepath.Join("testdata", "generationTestFiles", "schema")
4943

@@ -98,6 +92,13 @@ func makeKey(className, fileName string) ClassInfo {
9892
}
9993

10094
func TestGenerate(t *testing.T) {
95+
// Set UUID Generator Func to return a constant value in tests
96+
UUIDGenFunc = func() types.UUID {
97+
return types.NewUUIDWith(10, 10)
98+
}
99+
defer func() {
100+
UUIDGenFunc = types.NewUUID
101+
}()
101102
tcs := []struct {
102103
expected map[ClassInfo]string
103104
name string

0 commit comments

Comments
 (0)