Merged in feature/postprocessing (pull request #114)
Feature/postprocessing * tests * passtest * fixshorttests * mosttests * improvingbasedockerfile * testspeeds * testing * host * canparallel * clean * passfullsuite * singlepagemax * test * findfeatures * findstables * tbls * tablestoo * tablestoo * lateraltests * tableloc * cleanup * inlinetable * childids * cleanup * tests
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package test_test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/test"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/service/textract"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAssertStringToReader(t *testing.T) {
|
||||
t.Run("pass", func(t *testing.T) {
|
||||
mockT := &testing.T{}
|
||||
test.AssertStringToReader(t, "hi", strings.NewReader("hi"))
|
||||
assert.False(t, mockT.Failed())
|
||||
})
|
||||
t.Run("fail", func(t *testing.T) {
|
||||
mockT := &testing.T{}
|
||||
test.AssertStringToReader(mockT, "bye", strings.NewReader("hi"))
|
||||
assert.True(t, mockT.Failed())
|
||||
})
|
||||
}
|
||||
|
||||
func TestGetTextractFileResponse(t *testing.T) {
|
||||
out := test.GetTextractFileResponse(t, "../../assets/sampleGeneration/generated/helloWorld.gen")
|
||||
assert.IsType(t, map[string][]textract.DetectDocumentTextOutput{}, out)
|
||||
}
|
||||
Reference in New Issue
Block a user