You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
436 B
Go
22 lines
436 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_parseData(t *testing.T) {
|
|
db, err := parseData()
|
|
require.NoError(t, err)
|
|
|
|
stations, err := findStations(db, "Braunschweig")
|
|
require.NoError(t, err)
|
|
|
|
if assert.Len(t, stations, 2) {
|
|
assert.Equal(t, "Braunschweig Hbf", stations[0].name)
|
|
assert.Equal(t, "Braunschweig-Gliesmarode", stations[1].name)
|
|
}
|
|
}
|