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

Function TestNumber_Constructors

number_test.go:45–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestNumber_Constructors(t *testing.T) {
46 t.Run("reporter", func(t *testing.T) {
47 reporter := newMockReporter(t)
48 value := NewNumber(reporter, 10.3)
49 value.IsEqual(10.3)
50 value.chain.assert(t, success)
51 })
52
53 t.Run("config", func(t *testing.T) {
54 reporter := newMockReporter(t)
55 value := NewNumberC(Config{
56 Reporter: reporter,
57 }, 10.3)
58 value.IsEqual(10.3)
59 value.chain.assert(t, success)
60 })
61
62 t.Run("chain", func(t *testing.T) {
63 chain := newMockChain(t)
64 value := newNumber(chain, 10.3)
65 assert.NotSame(t, value.chain, chain)
66 assert.Equal(t, value.chain.context.Path, chain.context.Path)
67 })
68}
69
70func TestNumber_Raw(t *testing.T) {
71 reporter := newMockReporter(t)

Callers

nothing calls this directly

Calls 8

newMockReporterFunction · 0.85
NewNumberFunction · 0.85
NewNumberCFunction · 0.85
newMockChainFunction · 0.85
newNumberFunction · 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…