MCPcopy Index your code
hub / github.com/sideshow/apns2 / TestClientManagerGetDefaultOptions

Function TestClientManagerGetDefaultOptions

client_manager_test.go:68–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestClientManagerGetDefaultOptions(t *testing.T) {
69 manager := apns2.NewClientManager()
70 c1 := manager.Get(mockCert())
71 c2 := manager.Get(mockCert())
72 v1 := reflect.ValueOf(c1)
73 v2 := reflect.ValueOf(c2)
74 assert.NotNil(t, c1)
75 assert.Equal(t, v1.Pointer(), v2.Pointer())
76 assert.Equal(t, 1, manager.Len())
77}
78
79func TestClientManagerGetNilClientFactory(t *testing.T) {
80 manager := apns2.NewClientManager()

Callers

nothing calls this directly

Calls 4

GetMethod · 0.95
LenMethod · 0.95
NewClientManagerFunction · 0.92
mockCertFunction · 0.85

Tested by

no test coverage detected