Skip to content

Commit

Permalink
Unify test names.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwood committed Feb 9, 2020
1 parent f563e75 commit 63db551
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion adapter_endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

func TestZStack_RegisterAdapterEndpoint(t *testing.T) {
func Test_RegisterAdapterEndpoint(t *testing.T) {
t.Run("registers the endpoint", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions adapter_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"
)

func TestZStack_GetAdapterIEEEAddress(t *testing.T) {
func Test_GetAdapterIEEEAddress(t *testing.T) {
t.Run("gets the IEEE address", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand All @@ -36,7 +36,7 @@ func TestZStack_GetAdapterIEEEAddress(t *testing.T) {
})
}

func TestZStack_GetAdapterNetworkAddress(t *testing.T) {
func Test_GetAdapterNetworkAddress(t *testing.T) {
t.Run("gets the network address", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions adapter_initialise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

func TestZStack_Initialise(t *testing.T) {
func Test_Initialise(t *testing.T) {
t.Run("test initialisation process", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestZStack_Initialise(t *testing.T) {
})
}

func TestZStack_startZigbeeStack(t *testing.T) {
func Test_startZigbeeStack(t *testing.T) {
t.Run("starts zigbee stack and waits for confirmation", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down
2 changes: 1 addition & 1 deletion adapter_reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (m *MockRequestResponder) RequestResponse(ctx context.Context, req interfac
return args.Error(0)
}

func TestZStack_resetAdapter(t *testing.T) {
func Test_resetAdapter(t *testing.T) {
t.Run("verifies that a request response is made to unpi", func(t *testing.T) {
mrr := new(MockRequestResponder)

Expand Down
2 changes: 1 addition & 1 deletion events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"
)

func TestZStack__ReadEvent(t *testing.T) {
func Test_ReadEvent(t *testing.T) {
t.Run("errors if context times out", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions joining_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"
)

func TestZStack_PermitJoin(t *testing.T) {
func Test_PermitJoin(t *testing.T) {
t.Run("permit join for all routers sends message to all routers permitting joining", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestZStack_PermitJoin(t *testing.T) {
})
}

func TestZStack_DenyJoin(t *testing.T) {
func Test_DenyJoin(t *testing.T) {
t.Run("denying join sends message to all routers disabling joining", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down
2 changes: 1 addition & 1 deletion node_active_endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

func TestZStack_QueryNodeEndpoints(t *testing.T) {
func Test_QueryNodeEndpoints(t *testing.T) {
t.Run("returns an error if the query fails", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions nvram_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

func TestZStack_writeNVRAM(t *testing.T) {
func Test_writeNVRAM(t *testing.T) {
t.Run("verifies that a request response is made to unpi", func(t *testing.T) {
mrr := new(MockRequestResponder)

Expand Down Expand Up @@ -94,7 +94,7 @@ func (m *FailingMockRequestResponse) RequestResponse(ctx context.Context, req in
return nil
}

func TestZStack_NVRAMStructs(t *testing.T) {
func Test_NVRAMStructs(t *testing.T) {
t.Run("ZCDNVStartUpOption", func(t *testing.T) {
s := ZCDNVStartUpOption{
StartOption: 3,
Expand Down

0 comments on commit 63db551

Please sign in to comment.