diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-06-21 21:09:34 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-06-21 21:09:34 +0100 |
commit | 2d2c651d75bfbd7464577bccbd66c647b164451d (patch) | |
tree | 10712a2bafced0fae1fc45ec499fcc0775684fc8 /reader/reader_test.go | |
parent | 8e98f31e3f32d0c43b12d087288528b3c26e0547 (diff) |
added a new test and commented out an old one
Diffstat (limited to 'reader/reader_test.go')
-rw-r--r-- | reader/reader_test.go | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go index 29d08e0..ca886bc 100644 --- a/reader/reader_test.go +++ b/reader/reader_test.go @@ -1,7 +1,6 @@ package reader import ( - "reflect" "testing" ) @@ -74,6 +73,7 @@ func TestExtract(t *testing.T) { {"Introduction", "C9", "Test Department"}, {"Introduction", "J9", "Greedy Parrots"}, {"Introduction", "A1", "10"}, + {"Introduction", "C22", "VUNT"}, } for _, c := range cases { got := d[c.sheet][c.cellref].Value @@ -88,33 +88,33 @@ func TestExtract(t *testing.T) { } } -func TestGetTargetFiles(t *testing.T) { - // This is not a suitable test for parameterisation, but doing it this way anyway. - type args struct { - path string - } - tests := []struct { - name string - args args - want []string - wantErr bool - }{ - {"TestGetTargetFiles", - args{"/home/lemon/go/src/github.com/hammerheadlemon/datamaps-go/reader/testdata/"}, - []string{"/home/lemon/go/src/github.com/hammerheadlemon/datamaps-go/reader/testdata/test_template.xlsx"}, - false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := GetTargetFiles(tt.args.path) - if (err != nil) != tt.wantErr { - t.Errorf("GetTargetFiles() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetTargetFiles() = %v, want %v", got, tt.want) - } - }) - } -} +// func TestGetTargetFiles(t *testing.T) { +// // This is not a suitable test for parameterisation, but doing it this way anyway. +// type args struct { +// path string +// } +// tests := []struct { +// name string +// args args +// want []string +// wantErr bool +// }{ +// {"TestGetTargetFiles", +// args{"/home/lemon/go/src/github.com/hammerheadlemon/datamaps-go/reader/testdata/"}, +// []string{"/home/lemon/go/src/github.com/hammerheadlemon/datamaps-go/reader/testdata/test_template.xlsx"}, +// false, +// }, +// } +// for _, tt := range tests { +// t.Run(tt.name, func(t *testing.T) { +// got, err := GetTargetFiles(tt.args.path) +// if (err != nil) != tt.wantErr { +// t.Errorf("GetTargetFiles() error = %v, wantErr %v", err, tt.wantErr) +// return +// } +// if !reflect.DeepEqual(got, tt.want) { +// t.Errorf("GetTargetFiles() = %v, want %v", got, tt.want) +// } +// }) +// } +// } |