MCPcopy
hub / github.com/stretchr/testify / AssertExpectationsForObjects

Function AssertExpectationsForObjects

mock/mock.go:602–618  ·  view source on GitHub ↗

AssertExpectationsForObjects asserts that everything specified with On and Return of the specified objects was in fact called as expected. Calls may have occurred in any order.

(t TestingT, testObjects ...interface{})

Source from the content-addressed store, hash-verified

600//
601// Calls may have occurred in any order.
602func AssertExpectationsForObjects(t TestingT, testObjects ...interface{}) bool {
603 if h, ok := t.(tHelper); ok {
604 h.Helper()
605 }
606 for _, obj := range testObjects {
607 if m, ok := obj.(*Mock); ok {
608 t.Logf("Deprecated mock.AssertExpectationsForObjects(myMock.Mock) use mock.AssertExpectationsForObjects(myMock)")
609 obj = m
610 }
611 m := obj.(assertExpectationiser)
612 if !m.AssertExpectations(t) {
613 t.Logf("Expectations didn't match for Mock: %+v", reflect.TypeOf(m))
614 return false
615 }
616 }
617 return true
618}
619
620// AssertExpectations asserts that everything specified with On and Return was
621// in fact called as expected. Calls may have occurred in any order.

Calls 3

HelperMethod · 0.65
LogfMethod · 0.65
AssertExpectationsMethod · 0.65