2019-06-11 16:23:20 +00:00
|
|
|
package handler_test
|
2016-10-13 10:29:13 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/golang/mock/gomock"
|
|
|
|
)
|
|
|
|
|
|
|
|
func SubTest(t *testing.T, name string, runTest func(*testing.T, *MockFullDataStore)) {
|
2019-06-11 14:29:31 +00:00
|
|
|
t.Run(name, func(subT *testing.T) {
|
|
|
|
//subT.Parallel()
|
2016-10-13 10:29:13 +00:00
|
|
|
|
2019-06-11 14:29:31 +00:00
|
|
|
ctrl := gomock.NewController(subT)
|
|
|
|
defer ctrl.Finish()
|
2016-10-13 10:29:13 +00:00
|
|
|
|
2019-06-11 14:29:31 +00:00
|
|
|
store := NewMockFullDataStore(ctrl)
|
2016-10-13 10:29:13 +00:00
|
|
|
|
2019-06-11 14:29:31 +00:00
|
|
|
runTest(subT, store)
|
|
|
|
})
|
2016-10-13 10:29:13 +00:00
|
|
|
}
|