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, Guys

I'm running into a problem that I don't quite understand. For a expect I set:

-------------------------------------------------------------
mockBE.ExpectSet("PatientLevelStatus").Args(1);
-------------------------------------------------------------

I'm getting an exception like this:

===================================
TypeMock Verification: Call to SXAMMDeterminePriceBE.set_PatientLevelStatus() Parameter: 1
passed object <1>
is not the same instance as expected <1>
===================================

What does this mean? Can you guys help?

Thanks.


Richard
asked by rzhu (2.8k points)

2 Answers

0 votes
Hi Richard,

I'll need some more information, since I cannot reproduce it here. The error message tells me that the property Set is of a class type, not an int for example, which may cause some equality.

Please post both the property code and the test code. I hope I'll have better explanation then.

Thanks
answered by gilz (14.5k points)
0 votes
Never mind, I figure out the problem. You comment about object type mismatch reminded me. The set property is an object representation of integral data type, and I was passing in a long in the expect line. After I modified the code to pass in a object type, the problem was resolved.

Thanks for your quick comments.


Richard
answered by rzhu (2.8k points)
...