0ac5ff9e15
Test Query * depstextandclean * startedcleaningresult * resulttidyup * roundone * cleaning * unsyncedquery * startedtestsandsimplification * api * querytests * resultprocessortests * unittests * cleanup
32 lines
634 B
Go
32 lines
634 B
Go
package documenttext_test
|
|
|
|
import (
|
|
documenttext "queryorchestration/internal/document/text"
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestService(t *testing.T) {
|
|
svc := documenttext.New()
|
|
assert.NotNil(t, svc)
|
|
}
|
|
|
|
func TestIsValidVersion(t *testing.T) {
|
|
svc := documenttext.New()
|
|
|
|
assert.Nil(t, svc.IsValidVersion(2))
|
|
assert.Error(t, svc.IsValidVersion(-1))
|
|
}
|
|
|
|
func TestIsExtracted(t *testing.T) {
|
|
svc := documenttext.New()
|
|
|
|
assert.Nil(t, svc.IsExtracted(&documenttext.IsExtractedParams{
|
|
DocumentID: uuid.New(),
|
|
MinCleanVersion: int32(1),
|
|
MinTextVersion: int32(1),
|
|
}))
|
|
}
|