forked from hishamkaram/geoserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout_test.go
More file actions
25 lines (22 loc) · 709 Bytes
/
about_test.go
File metadata and controls
25 lines (22 loc) · 709 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
package geoserver
import (
"reflect"
"testing"
"github.com/stretchr/testify/assert"
)
func TestIsRunning(t *testing.T) {
gsCatalog := GetCatalog("http://localhost:8080/geoserver/", "admin", "geoserver")
isRunning, err := gsCatalog.IsRunning()
assert.True(t, isRunning)
assert.Nil(t, err)
gsCatalog = GetCatalog("http://localhost:8080/geoserver_dummy/", "admin", "geoserver")
isRunning, err = gsCatalog.IsRunning()
assert.False(t, isRunning)
assert.NotNil(t, err)
}
func TestGeoserverImplemetAbout(t *testing.T) {
gsCatalog := reflect.TypeOf(&GeoServer{})
AboutServiceType := reflect.TypeOf((*AboutService)(nil)).Elem()
check := gsCatalog.Implements(AboutServiceType)
assert.True(t, check)
}