bitblack / moq

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

Test cases are failing after upgrade to Moq.dll 4.0.10827.0 #346

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have some test projects using Moq.dll 4.0.812.4 and Moq.Contrib.dll
2. In one of my test project we had to moq a method having 7 parameters .As I 
found Moq.dll 4.0.812.4 does not support more then 5 parameters.So I used  
Moq.dll 4.0.10827.0 and refer from local directory of the test project.
3. when I am executing the test cases for the test project referring to Moq.dll 
4.0.10827.0 individually ,I am not getting any issue.All test cases passing 
without any issue.

4. But when I am running with other test projects referring to Moq.dll 
4.0.812.4 . Failing with the below error message.

Unit Test Adapter threw exception: 
Could not load file or assembly 'Moq, Version=4.0.812.4, Culture=neutral, 
PublicKeyToken=69f491c39445e920' or one of its dependencies. The located 
assembly's manifest definition does not match the assembly reference. 
(Exception from HRESULT: 0x80131040).

What is the expected output? What do you see instead?

All the test cases should execute successfully irrespective of the version of 
Moq.dll used.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by panigrah...@gmail.com on 23 Jun 2012 at 7:17

GoogleCodeExporter commented 9 years ago
This is not a moq failure. you have the wrong assembly version in the output 
folder, and the clr  barks. That's all.

Original comment by dan...@cazzulino.com on 24 Jun 2012 at 2:24

GoogleCodeExporter commented 9 years ago
Thanks for quick response.The Issue I have is in my test projects some of the 
older BVTs are eferring to Moq.dll 4.0.812.4 and some of the new BVTs are using 
4.0.10827.0.

When I am running the BVT projects individually all are passing.But when I am 
executing with the combination of old Moq dll BVT and new Moq BVT then the 
newer one passing and the older are failing with the above mentioned error 
message.

What my understanding with the default feature of CLR the newer version of 
Moq.dll is overriding on the older one.And certainly the BVTs expecting the old 
Moq.dll will fail.

So can any one suggest how I can run both BVTs as part of my weekly automation 
test script.

Original comment by panigrah...@gmail.com on 24 Jun 2012 at 7:18

GoogleCodeExporter commented 9 years ago
They must be different projects, with different output assembly paths and run 
from those different paths as the base. Largely depends on the runner you're 
using

Original comment by dan...@cazzulino.com on 24 Jun 2012 at 7:26