serializer.TestNew   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
package serializer
2
3
import (
4
	"testing"
5
6
	"github.com/stretchr/testify/assert"
7
)
8
9
func TestNew(t *testing.T) {
10
	serializer := New()
11
12
	assert.IsType(t, &rawSerializer{}, serializer.(*coordinatingSerializer).formatSerializers["raw"])
13
	assert.IsType(t, &jsonSerializer{}, serializer.(*coordinatingSerializer).formatSerializers["json"])
14
	assert.IsType(t, &xmlSerializer{}, serializer.(*coordinatingSerializer).formatSerializers["xml"])
15
}
16