mapserver/layerconfig/layerconfig_test.go
NatureFreshMilk abbf16b4bd layer parsing
2019-01-17 10:23:48 +01:00

27 lines
349 B
Go

package layerconfig
import (
"testing"
)
func TestReadJson(t *testing.T){
layers, err := ParseFile("./testdata/layers.json")
if err != nil {
t.Fatal(err)
}
if layers == nil {
t.Fatal("no data")
}
if len(layers) != 1 {
t.Fatal("length mismatch")
}
if layers[0].Name != "Base" {
t.Fatal("name mismatch")
}
}