trquth / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Updated Container in WebApi Not Returning Mocks #443

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the attached unit tests. There are three tests. The one that fails is 
UpdatedServerResolvesMocks.

What is the expected output? What do you see instead?
Assert.That(typeof(MockBananaService).FullName, Is.EqualTo(GetString(client, 
"http://test/fruit/banana")));
I'm expecting it to return the MockBananaService, but instead it returns 
BananaService.

What version of Autofac are you using? On what version of .NET/Silverlight?
trunk, using Autofac.Integration.WebApi

Please provide any additional information below.
I'm not as familiar with Mercurial as Git. I'll attach the diff for the commit, 
but let me know if I should fork or do something else to make it easier for 
ya'll. I'll also attach the primary file just for easy browsing.

Original issue reported on code.google.com by cameron.taggart on 8 Jun 2013 at 10:01

Attachments:

GoogleCodeExporter commented 8 years ago
It appears to be failing when some of the classes implement another common 
interface. In the attached code, it is IClonable. I just tested with a couple 
of common interfaces and a custom IFruitService interface instead of IClonable 
and they fail as well. The tests pass without the additional interfaces.

Original comment by cameron.taggart on 9 Jun 2013 at 5:32

GoogleCodeExporter commented 8 years ago

Original comment by travis.illig on 19 Jun 2013 at 2:25

GoogleCodeExporter commented 8 years ago
I had a look at this tonight but did not have all the required classes and 
projects referenced in the diff and cs files. After adding some of the missing 
classes I did get the test to pass but don't know if it really matched your 
scenario. It would be great if you could provide a smaller and more isolated 
example that reproduces the issue.

Original comment by alex.meyergleaves on 2 Jul 2013 at 12:14

GoogleCodeExporter commented 8 years ago
Given that we need some feedback to get this situation to reproduce and the 
issue has been open for a couple of months without that feedback, I'm going to 
close this issue as Invalid.

If we're able to get the feedback with a smaller reproduction that illustrates 
the issue as noted in comment #3 here, we can re-open and investigate more at 
that time.

Original comment by travis.illig on 3 Sep 2013 at 2:45