Skip to content

Commit

Permalink
remove redundant tests (covered by TestNewValidatorError)
Browse files Browse the repository at this point in the history
  • Loading branch information
denopink committed Jun 27, 2022
1 parent cc08b45 commit f0c26e2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 88 deletions.
32 changes: 0 additions & 32 deletions simpleMessageTypes_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,6 @@ import (
"github.com/stretchr/testify/assert"
)

func TestSimpleMessageTypesValidatorErrors(t *testing.T) {
tests := []struct {
description string
validatorErr ValidatorError
}{
// Success case
{
description: "ErrorNotSimpleResponseRequestType",
validatorErr: ErrorNotSimpleResponseRequestType,
},
{
description: "ErrorNotSimpleEventType",
validatorErr: ErrorNotSimpleEventType,
},
{
description: "ErrorInvalidSpanLength",
validatorErr: ErrorInvalidSpanLength,
},
{
description: "ErrorInvalidSpanFormat",
validatorErr: ErrorInvalidSpanFormat,
},
}

for _, tc := range tests {
t.Run(tc.description, func(t *testing.T) {
assert := assert.New(t)
assert.NotEmpty(tc.validatorErr.Error())
})
}
}

func TestSimpleMessageTypesHelperValidators(t *testing.T) {
tests := []struct {
description string
Expand Down
32 changes: 0 additions & 32 deletions spec_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,6 @@ import (
"github.com/stretchr/testify/assert"
)

func TestSpecValidatorErrors(t *testing.T) {
tests := []struct {
description string
validatorErr ValidatorError
}{
// Success case
{
description: "ErrorInvalidMessageEncoding",
validatorErr: ErrorInvalidMessageEncoding,
},
{
description: "ErrorInvalidMessageType",
validatorErr: ErrorInvalidMessageType,
},
{
description: "ErrorInvalidSource",
validatorErr: ErrorInvalidSource,
},
{
description: "ErrorInvalidDestination",
validatorErr: ErrorInvalidDestination,
},
}

for _, tc := range tests {
t.Run(tc.description, func(t *testing.T) {
assert := assert.New(t)
assert.NotEmpty(tc.validatorErr.Error())
})
}
}

func TestSpecHelperValidators(t *testing.T) {
tests := []struct {
description string
Expand Down
24 changes: 0 additions & 24 deletions validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,6 @@ import (
"go.uber.org/multierr"
)

func TestValidatorErrors(t *testing.T) {
tests := []struct {
description string
validatorErr ValidatorError
}{
// Success case
{
description: "ErrorInvalidValidator",
validatorErr: ErrorInvalidValidator,
},
{
description: "ErrorInvalidMsgType",
validatorErr: ErrorInvalidMsgType,
},
}

for _, tc := range tests {
t.Run(tc.description, func(t *testing.T) {
assert := assert.New(t)
assert.NotEmpty(tc.validatorErr.Error())
})
}
}

func TestNewValidatorError(t *testing.T) {
tests := []struct {
description string
Expand Down

0 comments on commit f0c26e2

Please sign in to comment.