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

Function TestDuration_Constructors

duration_test.go:30–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestDuration_Constructors(t *testing.T) {
31 tm := time.Second
32
33 t.Run("reporter", func(t *testing.T) {
34 reporter := newMockReporter(t)
35 value := NewDuration(reporter, tm)
36 value.IsEqual(tm)
37 value.chain.assert(t, success)
38 })
39
40 t.Run("config", func(t *testing.T) {
41 reporter := newMockReporter(t)
42 value := NewDurationC(Config{
43 Reporter: reporter,
44 }, tm)
45 value.IsEqual(tm)
46 value.chain.assert(t, success)
47 })
48
49 t.Run("chain", func(t *testing.T) {
50 chain := newMockChain(t)
51 value := newDuration(chain, &tm)
52 assert.NotSame(t, value.chain, chain)
53 assert.Equal(t, value.chain.context.Path, chain.context.Path)
54 })
55}
56
57func TestDuration_Raw(t *testing.T) {
58 reporter := newMockReporter(t)

Callers

nothing calls this directly

Calls 8

newMockReporterFunction · 0.85
NewDurationFunction · 0.85
NewDurationCFunction · 0.85
newMockChainFunction · 0.85
newDurationFunction · 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…