-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResolveAll is broken #17
Comments
Actually, this looks like this is related to the interface of IUnityContainer changing, which seems to have broken Prism. Still investigating. |
Could you be more specific: what is failing and under what circumstances. Could you give me a test case where it fails? |
This test fails: https://github.com/PrismLibrary/Prism/blob/master/Source/Wpf/Prism.Unity.Wpf.Tests/UnityServiceLocatorAdapterFixture.cs#L34 This actually seems to be related to the fact that the IUnityContainer interface was changed. ResolveAll is no longer on the interface, which means the new extension method is being used instead of the interface method (which has been removed), hence breaking our tests. Do you have a list of all the breaking changes you have made? |
Looking at the coverage date I can see it is being tested properly: https://codecov.io/gh/unitycontainer/unity/src/master/src/Unity/Container/UnityContainerExtensions.cs |
I listed all breaking changes in release notes every time there was a change. |
I don't see them: https://github.com/unitycontainer/abstractions/releases https://github.com/unitycontainer/container/releases Should I be looking somewhere else? |
I see the problem. Mocks will not work. |
https://github.com/unitycontainer/unity/releases Did not have time to update these everywhere |
I see... I will have to find a way to update my tests to account for all the breaking changes. |
I believe you have introduced a breaking change in which the UnityCOntainerExtensions.ResolveAll does not call the correct method. See: https://github.com/unitycontainer/abstractions/blob/master/src/Utility/UnityContainerExtensions.cs#L519
The line should read
var result = (container ?? throw new ArgumentNullException(nameof(container))).ResolveAll((type ?? throw new ArgumentNullException(nameof(type
The key method missing being ResolveAll.
This was discovered when Prism upgraded to v5 and our unit tests started failing.
The text was updated successfully, but these errors were encountered: