MCPcopy Create free account
hub / github.com/gavv/httpexpect / TestEnvironment_Constructors

Function TestEnvironment_Constructors

environment_test.go:12–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestEnvironment_Constructors(t *testing.T) {
13 t.Run("reporter", func(t *testing.T) {
14 reporter := newMockReporter(t)
15 env := NewEnvironment(reporter)
16 env.chain.assert(t, success)
17 })
18
19 t.Run("config", func(t *testing.T) {
20 reporter := newMockReporter(t)
21 env := NewEnvironmentC(Config{
22 Reporter: reporter,
23 })
24 env.chain.assert(t, success)
25 })
26
27 t.Run("chain", func(t *testing.T) {
28 chain := newMockChain(t)
29 value := newEnvironment(chain)
30 assert.NotSame(t, value.chain, chain)
31 assert.Equal(t, value.chain.context.Path, chain.context.Path)
32 })
33}
34
35func TestEnvironment_Reentrancy(t *testing.T) {
36 reporter := newMockReporter(t)

Callers

nothing calls this directly

Calls 7

newMockReporterFunction · 0.85
NewEnvironmentFunction · 0.85
NewEnvironmentCFunction · 0.85
newMockChainFunction · 0.85
newEnvironmentFunction · 0.85
assertMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…