File: agent_get_best_available_candidate_pair_test.go

package info (click to toggle)
golang-github-pion-ice.v2 2.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 684 kB
  • sloc: makefile: 5
file content (28 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//go:build !js
// +build !js

package ice

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestNoBestAvailableCandidatePairAfterAgentConstruction(t *testing.T) {
	agent := setupTest(t)

	require.Nil(t, agent.getBestAvailableCandidatePair())

	tearDownTest(t, agent)
}

func setupTest(t *testing.T) *Agent {
	agent, err := NewAgent(&AgentConfig{})
	require.NoError(t, err)
	return agent
}

func tearDownTest(t *testing.T, agent *Agent) {
	require.NoError(t, agent.Close())
}