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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Hi,
I got a a "fatal runtime engine error" when I set the following expectation:

MockManager.Init();
Mock efeuPersonMock = MockManager.MockAll(typeof(Person), Constructor.Mocked);
MockObject queryMock = MockManager.MockObject(typeof(Query<Person>), Constructor.Mocked);
Query<Person> query = (Query<Person>)queryMock.Object;
efeuPersonMock.AlwaysReturn("GetQueryEx", query);

for the following method:

public static Query<Person> GetQueryEx(short? bundesland, string familienname,
DateTime? geburtsdatum, int? geburtsJahrVon, int? geburtsJahrBis, string geschlecht,
string postleitzahl, bool? sucheNichtAktuellePartner, bool? suchePhonetisch,
bool? sucheZusaetzlicheNamen, bool? sucheGeburtsname, string vorname)
{ ... }

if I define the method without any nullable parameters then works:

public static Query<Person> GetQueryEx(short bundesland, string familienname,
DateTime geburtsdatum, int geburtsJahrVon, int geburtsJahrBis, string geschlecht,
string postleitzahl, bool sucheNichtAktuellePartner, bool suchePhonetisch,
bool sucheZusaetzlicheNamen, bool sucheGeburtsname, string vorname)
{ ... }

so it seems to be a problem with the nullable arguments

sorry for not provinding a typemock.out but I dont find it.
I am using VS2005 8.0.50727.26
und typemock 3.0

Thanks for any help
asked by felipe2050 (1.6k points)

3 Answers

0 votes
Hi,
This is a bug :twisted:

Thanks for finding it.

We will fix it and post the fix.
answered by scott (32k points)
0 votes
Hi,
I will send you the fix offline, please tell me if it works.
answered by scott (32k points)
0 votes
A fix has been made, it will be part of our next patch release (3.0.1) 8)
answered by scott (32k points)
...