(t *testing.T)
| 165 | } |
| 166 | |
| 167 | func TestNew_missingDependencyErrorMessage(t *testing.T) { |
| 168 | defer func() { |
| 169 | if r := recover(); r != nil { |
| 170 | if strings.Contains(r.(error).Error(), "\"reflect\".makeFuncStub") { |
| 171 | t.Error("should not contain reflection stub") |
| 172 | } |
| 173 | return |
| 174 | } |
| 175 | t.Error("test should panic") |
| 176 | }() |
| 177 | c := New() |
| 178 | c.Provide(di.Deps{mockConstructor}) |
| 179 | c.Invoke(func(a a) error { |
| 180 | return nil |
| 181 | }) |
| 182 | } |
| 183 | |
| 184 | func TestC_cleanup(t *testing.T) { |
| 185 | var dependencyCleanupCalled bool |