Merged in feature/docclean (pull request #55)
Doc Clean Structure * outline * isdocclean * placeholder for clean log * versionplustesting * versionplustesting * testspassed
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -36,3 +37,21 @@ func TestNew(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
func TestSetValidator(t *testing.T) {
|
||||
cfg := server.BaseConfig{}
|
||||
|
||||
assert.Nil(t, cfg.Validator)
|
||||
|
||||
cfg.SetValidator()
|
||||
assert.NotNil(t, cfg.Validator)
|
||||
}
|
||||
|
||||
func TestGetValidator(t *testing.T) {
|
||||
cfg := server.BaseConfig{}
|
||||
|
||||
assert.Nil(t, cfg.GetValidator())
|
||||
cfg.Validator = validator.New()
|
||||
assert.NotNil(t, cfg.GetValidator())
|
||||
assert.EqualExportedValues(t, validator.New(), cfg.GetValidator())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user