Merged in feature/doctextstructure (pull request #56)
DocTextRunner Structure * firstround * shorttests
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
package documenttext_test
|
||||
|
||||
import (
|
||||
"queryorchestration/internal/document"
|
||||
documenttext "queryorchestration/internal/document/text"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
"queryorchestration/internal/serviceconfig/objectstore"
|
||||
"queryorchestration/internal/serviceconfig/queue/querysync"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type DocTextConfig struct {
|
||||
serviceconfig.BaseConfig
|
||||
objectstore.ObjectStoreConfig
|
||||
querysync.QuerySyncConfig
|
||||
}
|
||||
|
||||
func TestService(t *testing.T) {
|
||||
svc := documenttext.New()
|
||||
cfg := &DocTextConfig{}
|
||||
svc := documenttext.New(cfg, &documenttext.Services{
|
||||
Document: document.New(cfg),
|
||||
})
|
||||
assert.NotNil(t, svc)
|
||||
}
|
||||
|
||||
func TestIsExtracted(t *testing.T) {
|
||||
svc := documenttext.New()
|
||||
|
||||
assert.Nil(t, svc.IsExtracted(&documenttext.IsExtractedParams{
|
||||
DocumentID: uuid.New(),
|
||||
MinCleanVersion: int32(1),
|
||||
MinTextVersion: int32(1),
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user