PDA

View Full Version : Mocking Win32 API


Phlip
07-04-2003, 05:06 AM
Alvin777 wrote:
How can I use something like mock objects when calling Win API functions like this?

Can't you write tests by putting a dedicated mail server on your system,
then send it real mail?

--
Phlip
http://www.c2.com/cgi/wiki?TestFirstUserInterfaces

Alvin777
07-06-2003, 12:24 PM
"Phlip" <phlip_cpp@yahoo.com> wrote in message news:<9ZeNa.2422$lT1.423@newssvr17.news.prodigy.com>... Alvin777 wrote: How can I use something like mock objects when calling Win API functions like this? Can't you write tests by putting a dedicated mail server on your system, then send it real mail?

This is what I did before. But it's hard to simulate
MAPI_E_LOGON_FAILED, MAPI_E_USER_CANCEL and other errors. Those lags
at MAPILogonEx() make tests run minutes rather than seconds.

And TDD says that I have to test domain code independently of
enviroment, isn't it?

--
Alvin777


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service