chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi.

We are in the process of upgrading from 7.3 to 7.5.6, and have some unit tests which fail after installation of 7.5.6 being run with the Visual Studio test runner, while passing with 7.3 installed.

I was under the impression that it should be possible to run the tests referencing the 7.3 dll's with 7.5.6 installed locally (the dll's are referenced from source control folder and not the Typemock install folder). ?

Autodeploy works fine on the TFS build server, so the issue is only on local dev boxes.

Do I need to do something specific to make it work?

Regards,
Peter
asked by peterlindberg (640 points)

2 Answers

0 votes
Hi,

It shouldn't be a problem use old references with a newer version, unless there's a bug :?
I need more details in order to analyze the issue.
Do the failed tests have anything in common?
Please send me the error message/exception of the failed tests.
I'd also like to reproduce this issue on my machine, can you send me a code snippet or repro?
answered by Bar (3.3k points)
0 votes
Hi Bar.

Sorry for the late reply :)

It seems to be in regard to tests using the MockManager - but not all tests using MockManager fails...

In some of the tests the asserts just don't pass when having 7.5.6 installed, but do when 7.3 is installed - in a few other tests, the following exception is thrown:

TypeMock.VerifyException: 
TypeMock Verification: Expected a new instance of System.Data.SqlClient.SqlParameter (try using MockAll)
Method System.Data.SqlClient.SqlParameter..ctor() has 1 more expected calls
Method System.Data.SqlClient.SqlParameter.set_Direction() has 1 more expected calls
Method System.Data.SqlClient.SqlParameter.set_Value() has 1 more expected calls
Expected a new instance of System.Data.SqlClient.SqlParameter (try using MockAll)
Method System.Data.SqlClient.SqlParameter..ctor() has 1 more expected calls
Method System.Data.SqlClient.SqlParameter.set_Direction() has 1 more expected calls
Method System.Data.SqlClient.SqlParameter.set_Value() has 1 more expected calls
Call to System.Data.SqlClient.SqlCommand..ctor() expected 3 arguments but was called with 0

Method System.Data.SqlClient.SqlCommand.ExecuteNonQuery() has 1 more expected calls
Method System.Data.SqlClient.SqlTransaction.Commit() has 1 more expected calls
Result StackTrace:   
at TypeMock.MockManager.Verify()


I think we have previous had an email correspodance with you in the company I'm at, is it OK if I send the code samples to you via mail?

Regards,
Peter
answered by peterlindberg (640 points)
...