MCPcopy
hub / github.com/pion/webrtc / TestNewAPI_Options

Function TestNewAPI_Options

api_test.go:21–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestNewAPI_Options(t *testing.T) {
22 s := SettingEngine{}
23 s.DetachDataChannels()
24
25 api := NewAPI(
26 WithSettingEngine(s),
27 )
28
29 assert.True(t, api.settingEngine.detach.DataChannels, "failed to set settings engine")
30 assert.NotEmpty(t, api.mediaEngine.audioCodecs, "failed to set audio codecs")
31 assert.NotEmpty(t, api.mediaEngine.videoCodecs, "failed to set video codecs")
32}
33
34func TestNewAPI_OptionsDefaultize(t *testing.T) {
35 api := NewAPI(

Callers

nothing calls this directly

Calls 3

DetachDataChannelsMethod · 0.95
NewAPIFunction · 0.70
WithSettingEngineFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…