Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kutluhanmetin committed Sep 26, 2023
1 parent 6806991 commit 7a4793f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions base/commands/serializer/serializer_it_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package serializer

import (
"fmt"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -39,11 +38,6 @@ var (
)

func init() {
UUIDGenFunc = func() types.UUID {
return types.NewUUIDWith(10, 10)
}
s := types.NewUUIDWith(10, 10).String()
fmt.Println(s)
generationTestFilesDir := filepath.Join("testdata", "generationTestFiles")
generationTestFilesSchemaDir := filepath.Join("testdata", "generationTestFiles", "schema")

Expand Down Expand Up @@ -98,6 +92,13 @@ func makeKey(className, fileName string) ClassInfo {
}

func TestGenerate(t *testing.T) {
// Set UUID Generator Func to return a constant value in tests
UUIDGenFunc = func() types.UUID {
return types.NewUUIDWith(10, 10)
}
defer func() {
UUIDGenFunc = types.NewUUID
}()
tcs := []struct {
expected map[ClassInfo]string
name string
Expand Down

0 comments on commit 7a4793f

Please sign in to comment.