MCPcopy Index your code
hub / github.com/gavv/httpexpect / TestString_Constructors

Function TestString_Constructors

string_test.go:61–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestString_Constructors(t *testing.T) {
62 t.Run("reporter", func(t *testing.T) {
63 reporter := newMockReporter(t)
64 value := NewString(reporter, "Hello")
65 value.IsEqual("Hello")
66 value.chain.assert(t, success)
67 })
68
69 t.Run("config", func(t *testing.T) {
70 reporter := newMockReporter(t)
71 value := NewStringC(Config{
72 Reporter: reporter,
73 }, "Hello")
74 value.IsEqual("Hello")
75 value.chain.assert(t, success)
76 })
77
78 t.Run("chain", func(t *testing.T) {
79 chain := newMockChain(t)
80 value := newString(chain, "Hello")
81 assert.NotSame(t, value.chain, chain)
82 assert.Equal(t, value.chain.context.Path, chain.context.Path)
83 })
84}
85
86func TestString_Raw(t *testing.T) {
87 reporter := newMockReporter(t)

Callers

nothing calls this directly

Calls 8

newMockReporterFunction · 0.85
NewStringFunction · 0.85
NewStringCFunction · 0.85
newMockChainFunction · 0.85
newStringFunction · 0.85
assertMethod · 0.80
IsEqualMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…