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

Function TestValue_PathExpressions

value_test.go:952–1130  ·  view source on GitHub ↗

based on github.com/yalp/jsonpath

(t *testing.T)

Source from the content-addressed store, hash-verified

950
951// based on github.com/yalp/jsonpath
952func TestValue_PathExpressions(t *testing.T) {
953 data := map[string]interface{}{
954 "A": []interface{}{
955 "string",
956 23.3,
957 3.0,
958 true,
959 false,
960 nil,
961 },
962 "B": "value",
963 "C": 3.14,
964 "D": map[string]interface{}{
965 "C": 3.1415,
966 "V": []interface{}{
967 "string2a",
968 "string2b",
969 map[string]interface{}{
970 "C": 3.141592,
971 },
972 },
973 },
974 "E": map[string]interface{}{
975 "A": []interface{}{"string3"},
976 "D": map[string]interface{}{
977 "V": map[string]interface{}{
978 "C": 3.14159265,
979 },
980 },
981 },
982 "F": map[string]interface{}{
983 "V": []interface{}{
984 "string4a",
985 "string4b",
986 map[string]interface{}{
987 "CC": 3.1415926535,
988 },
989 map[string]interface{}{
990 "CC": "hello",
991 },
992 []interface{}{
993 "string5a",
994 "string5b",
995 },
996 []interface{}{
997 "string6a",
998 "string6b",
999 },
1000 },
1001 },
1002 }
1003
1004 runTests := func(tests map[string]interface{}) {
1005 reporter := newMockReporter(t)
1006
1007 value := NewValue(reporter, data)
1008 value.chain.assert(t, success)
1009

Callers

nothing calls this directly

Calls 6

PathMethod · 0.95
newMockReporterFunction · 0.85
NewValueFunction · 0.85
assertMethod · 0.80
EqualMethod · 0.45
RawMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…