File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ package transformers
2
+
3
+ import (
4
+ "net/http"
5
+ "testing"
6
+
7
+ "github.com/stretchr/testify/assert"
8
+ "github.com/stretchr/testify/mock"
9
+ )
10
+
11
+ func TestTransformerGroup_TransformLinks (test * testing.T ) {
12
+ type args struct {
13
+ links []string
14
+ response * http.Response
15
+ responseContent []byte
16
+ }
17
+
18
+ for _ , data := range []struct {
19
+ name string
20
+ transformers TransformerGroup
21
+ args args
22
+ wantLinks []string
23
+ wantErr assert.ErrorAssertionFunc
24
+ }{
25
+ // TODO: Add test cases.
26
+ } {
27
+ test .Run (data .name , func (test * testing.T ) {
28
+ gotLinks , gotErr := data .transformers .TransformLinks (
29
+ data .args .links ,
30
+ data .args .response ,
31
+ data .args .responseContent ,
32
+ )
33
+
34
+ for _ , transformer := range data .transformers {
35
+ mock .AssertExpectationsForObjects (test , transformer )
36
+ }
37
+ assert .Equal (test , data .wantLinks , gotLinks )
38
+ data .wantErr (test , gotErr )
39
+ })
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments