This is a small fix for PR #71 where an override for instance caching was implemented.
The error was that the getInstance(Object params) was being invoked in the failing test method instead of the getInstance(Object params, Boolean newInstance). This caused the params to not be null, and so the code expected that the created instance was an implementation of a Provider, which it wasn't.
See below the error message and the stack trace of the failing test:
di_Binding.BindingException: Apex binding di_BindingTest.Bob implementation di_BindingTest.Bob does not implement the Provider interface.
Class.di_Binding.ApexBinding.newInstance: line 413, column 1
Class.di_Binding.getInstance: line 82, column 1
Class.di_Binding.getInstance: line 70, column 1
Class.di_BindingTest.givenApexBindingWhenGetNewInstanceThenNewInstance: line 53, column 1
This is a small fix for PR #71 where an override for instance caching was implemented.
The error was that the
getInstance(Object params)
was being invoked in the failing test method instead of thegetInstance(Object params, Boolean newInstance)
. This caused theparams
to not be null, and so the code expected that the created instance was an implementation of aProvider
, which it wasn't.See below the error message and the stack trace of the failing test:
This change is