component/componenttest/nop_host_test.go
raw| 1 | // Copyright The OpenTelemetry Authors |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | package componenttest |
| 5 | |
| 6 | import ( |
| 7 | "testing" |
| 8 | |
| 9 | "github.com/stretchr/testify/assert" |
| 10 | "github.com/stretchr/testify/require" |
| 11 | ) |
| 12 | |
| 13 | func TestNewNopHost(t *testing.T) { |
| 14 | nh := NewNopHost() |
| 15 | require.NotNil(t, nh) |
| 16 | require.IsType(t, &nopHost{}, nh) |
| 17 | |
| 18 | extensions := nh.GetExtensions() |
| 19 | assert.NotNil(t, extensions) |
| 20 | assert.Empty(t, extensions) |
| 21 | } |