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

Function TestArray_FailedChain

array_test.go:10–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestArray_FailedChain(t *testing.T) {
11 check := func(value *Array) {
12 value.chain.assert(t, failure)
13
14 value.Path("$").chain.assert(t, failure)
15 value.Schema("")
16 value.Alias("foo")
17
18 var target interface{}
19 value.Decode(&target)
20
21 value.Length().chain.assert(t, failure)
22 value.Value(0).chain.assert(t, failure)
23 value.First().chain.assert(t, failure)
24 value.Last().chain.assert(t, failure)
25
26 value.IsEmpty()
27 value.NotEmpty()
28 value.IsEqual([]interface{}{})
29 value.NotEqual([]interface{}{})
30 value.IsEqualUnordered([]interface{}{})
31 value.NotEqualUnordered([]interface{}{})
32 value.InList([]interface{}{})
33 value.NotInList([]interface{}{})
34 value.ConsistsOf("foo")
35 value.NotConsistsOf("foo")
36 value.Contains("foo")
37 value.NotContains("foo")
38 value.ContainsAll("foo")
39 value.NotContainsAll("foo")
40 value.ContainsAny("foo")
41 value.NotContainsAny("foo")
42 value.ContainsOnly("foo")
43 value.NotContainsOnly("foo")
44 value.HasValue(0, nil)
45 value.NotHasValue(0, nil)
46
47 assert.NotNil(t, value.Iter())
48 assert.Equal(t, 0, len(value.Iter()))
49
50 value.Every(func(_ int, val *Value) {
51 val.String().NotEmpty()
52 })
53 value.Filter(func(_ int, val *Value) bool {
54 val.String().NotEmpty()
55 return true
56 })
57 value.Transform(func(index int, value interface{}) interface{} {
58 return nil
59 })
60 value.Find(func(index int, value *Value) bool {
61 value.String().NotEmpty()
62 return true
63 })
64 value.FindAll(func(index int, value *Value) bool {
65 value.String().NotEmpty()
66 return true
67 })

Callers

nothing calls this directly

Calls 15

newMockChainFunction · 0.85
newArrayFunction · 0.85
assertMethod · 0.80
FirstMethod · 0.80
LastMethod · 0.80
IsEqualUnorderedMethod · 0.80
NotEqualUnorderedMethod · 0.80
ConsistsOfMethod · 0.80
NotConsistsOfMethod · 0.80
ContainsAllMethod · 0.80
NotContainsAllMethod · 0.80
ContainsAnyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…