refactor(tests): move person
type to test function
This commit is contained in:
parent
b3d5fbf332
commit
c0fb09e573
@ -13,6 +13,7 @@ import (
|
|||||||
//go:embed collection_test.csv
|
//go:embed collection_test.csv
|
||||||
var testData []byte
|
var testData []byte
|
||||||
|
|
||||||
|
func TestCollection(t *testing.T) {
|
||||||
type person struct {
|
type person struct {
|
||||||
ID int
|
ID int
|
||||||
LastName string
|
LastName string
|
||||||
@ -20,7 +21,6 @@ type person struct {
|
|||||||
Email string
|
Email string
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCollection(t *testing.T) {
|
|
||||||
data := strings.Split(string(testData), "\n")
|
data := strings.Split(string(testData), "\n")
|
||||||
|
|
||||||
lines := OfSlice(data).Skip(1).Filter(func(s string) bool {
|
lines := OfSlice(data).Skip(1).Filter(func(s string) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user