@@ -8,14 +8,35 @@ import (
88
99type HyperdriveTestSuite struct {
1010 suite.Suite
11+ Endpoint Endpointer
12+ }
13+
14+ func (suite * HyperdriveTestSuite ) SetupTest () {
15+ suite .Endpoint = NewEndpoint ("Test" , "Test Endpoint" , "/test" )
1116}
1217
1318func (suite * HyperdriveTestSuite ) TestNewAPI () {
1419 suite .IsType (API {}, NewAPI (), "expects an instance of hyperdrive.API" )
1520}
1621
1722func (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" )
1940}
2041
2142func TestHyperdriveTestSuite (t * testing.T ) {
0 commit comments