@@ -8,14 +8,35 @@ import (
8
8
9
9
type HyperdriveTestSuite struct {
10
10
suite.Suite
11
+ Endpoint Endpointer
12
+ }
13
+
14
+ func (suite * HyperdriveTestSuite ) SetupTest () {
15
+ suite .Endpoint = NewEndpoint ("Test" , "Test Endpoint" , "/test" )
11
16
}
12
17
13
18
func (suite * HyperdriveTestSuite ) TestNewAPI () {
14
19
suite .IsType (API {}, NewAPI (), "expects an instance of hyperdrive.API" )
15
20
}
16
21
17
22
func (suite * HyperdriveTestSuite ) TestNewEndpoint () {
18
- suite .IsType (& Endpoint {}, NewEndpoint ("Test" , "Test Endpoint" , "/test" ), "expects an instance of hyperdrive.API" )
23
+ suite .IsType (& Endpoint {}, suite .Endpoint , "expects an instance of hyperdrive.Endpoint" )
24
+ }
25
+
26
+ func (suite * HyperdriveTestSuite ) TestGetName () {
27
+ suite .Equal ("Test" , suite .Endpoint .GetName (), "expects GetName() to return Name" )
28
+ }
29
+
30
+ func (suite * HyperdriveTestSuite ) TestGetDesc () {
31
+ suite .Equal ("Test Endpoint" , suite .Endpoint .GetDesc (), "expects GetDesc() to return Desc" )
32
+ }
33
+
34
+ func (suite * HyperdriveTestSuite ) TestGetPath () {
35
+ suite .Equal ("/test" , suite .Endpoint .GetPath (), "expects GetPath() to return Path" )
36
+ }
37
+
38
+ func (suite * HyperdriveTestSuite ) TestEndpointer () {
39
+ suite .Implements ((* Endpointer )(nil ), suite .Endpoint , "expects an implementation of hyperdrive.Endpointer interface" )
19
40
}
20
41
21
42
func TestHyperdriveTestSuite (t * testing.T ) {
0 commit comments