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

Function TestValue_Constructors

value_test.go:50–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestValue_Constructors(t *testing.T) {
51 t.Run("reporter", func(t *testing.T) {
52 reporter := newMockReporter(t)
53 value := NewValue(reporter, "Test")
54 value.IsEqual("Test")
55 value.chain.assert(t, success)
56 value.String().chain.assert(t, success)
57 })
58
59 t.Run("config", func(t *testing.T) {
60 reporter := newMockReporter(t)
61 value := NewValueC(Config{
62 Reporter: reporter,
63 }, "Test")
64 value.IsEqual("Test")
65 value.chain.assert(t, success)
66 value.String().chain.assert(t, success)
67 })
68
69 t.Run("chain", func(t *testing.T) {
70 chain := newMockChain(t)
71 value := newValue(chain, "Test")
72 assert.NotSame(t, value.chain, chain)
73 assert.Equal(t, value.chain.context.Path, chain.context.Path)
74 })
75}
76
77func TestValue_Decode(t *testing.T) {
78 t.Run("target is empty interface", func(t *testing.T) {

Callers

nothing calls this directly

Calls 9

newMockReporterFunction · 0.85
NewValueFunction · 0.85
NewValueCFunction · 0.85
newMockChainFunction · 0.85
newValueFunction · 0.85
assertMethod · 0.80
IsEqualMethod · 0.45
StringMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…