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

Function TestObject_IsEmpty

object_test.go:440–460  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

438}
439
440func TestObject_IsEmpty(t *testing.T) {
441 t.Run("empty map", func(t *testing.T) {
442 reporter := newMockReporter(t)
443
444 NewObject(reporter, map[string]interface{}{}).IsEmpty().
445 chain.assert(t, success)
446
447 NewObject(reporter, map[string]interface{}{}).NotEmpty().
448 chain.assert(t, failure)
449 })
450
451 t.Run("one empty element", func(t *testing.T) {
452 reporter := newMockReporter(t)
453
454 NewObject(reporter, map[string]interface{}{"": nil}).IsEmpty().
455 chain.assert(t, failure)
456
457 NewObject(reporter, map[string]interface{}{"": nil}).NotEmpty().
458 chain.assert(t, success)
459 })
460}
461
462func TestObject_IsEqual(t *testing.T) {
463 t.Run("basic", func(t *testing.T) {

Callers

nothing calls this directly

Calls 5

newMockReporterFunction · 0.85
NewObjectFunction · 0.85
assertMethod · 0.80
IsEmptyMethod · 0.45
NotEmptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…