-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathulic_test.go
More file actions
52 lines (49 loc) · 944 Bytes
/
ulic_test.go
File metadata and controls
52 lines (49 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package teryt
import (
"testing"
"time"
"github.com/stretchr/testify/require"
)
func TestULICFromFile(t *testing.T) {
got, err := ULICFromFile("ulic.csv")
require.NoError(t, err)
want := []SetULIC{
{
Woj: 4,
Pow: 10,
Gmi: 4,
RodzGmi: 2,
Sym: "0094774",
SymUl: "19326",
Cecha: "ul.",
Nazwa1: "Rzeczna",
Nazwa2: "",
StanNa: mustT(time.Parse("2006-01-02", "2019-08-30")),
},
{
Woj: 4,
Pow: 10,
Gmi: 4,
RodzGmi: 2,
Sym: "0094870",
SymUl: "08646",
Cecha: "ul.",
Nazwa1: "Kmieciaka",
Nazwa2: "",
StanNa: mustT(time.Parse("2006-01-02", "2019-08-30")),
},
{
Woj: 4,
Pow: 10,
Gmi: 5,
RodzGmi: 4,
Sym: "0929612",
SymUl: "08153",
Cecha: "ul.",
Nazwa1: "Kasprowicza",
Nazwa2: "Jana",
StanNa: mustT(time.Parse("2006-01-02", "2019-08-30")),
},
}
require.Equal(t, want, got)
}