-
Notifications
You must be signed in to change notification settings - Fork 33
/
error_test.go
32 lines (24 loc) · 878 Bytes
/
error_test.go
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
26
27
28
29
30
31
32
package goconcurrentqueue
import (
"testing"
"github.com/stretchr/testify/suite"
)
type QueueErrorTestSuite struct {
suite.Suite
queueError *QueueError
}
// ***************************************************************************************
// ** Initialization
// ***************************************************************************************
// no elements at initialization
func (suite *QueueErrorTestSuite) TestInitialization() {
queueError := NewQueueError("code", "message")
suite.Equal("code", queueError.Code())
suite.Equal("message", queueError.Error())
}
// ***************************************************************************************
// ** Run suite
// ***************************************************************************************
func TestQueueErrorTestSuite(t *testing.T) {
suite.Run(t, new(QueueErrorTestSuite))
}