MCPcopy Create free account
hub / github.com/sideshow/apns2 / TestClientManagerAdd

Function TestClientManagerAdd

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

Source from the content-addressed store, hash-verified

130}
131
132func TestClientManagerAdd(t *testing.T) {
133 fn := func(certificate tls.Certificate) *apns2.Client {
134 t.Fatal("factory should not have been called")
135 return nil
136 }
137
138 manager := apns2.NewClientManager()
139 manager.Factory = fn
140 manager.Add(apns2.NewClient(mockCert()))
141 manager.Get(mockCert())
142}
143
144func TestClientManagerAddTwice(t *testing.T) {
145 manager := apns2.NewClientManager()

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
GetMethod · 0.95
NewClientManagerFunction · 0.92
NewClientFunction · 0.92
mockCertFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…