delphixtreme header
Welcome, Guest. Please login or register.
September 08, 2010, 05:20:35 AM

Login with username, password and session length
Search:     Advanced search
Registration closed until spam can be handled. Send inquiries to the administrator.
38 Posts in 14 Topics by 108 Members
Latest Member: xxxsllikab
* Home Help Search Login Register
+  delphixtreme
|-+  General Category
| |-+  Unit Testing
| | |-+  Problems with Dunit and a Romote Data Module in Delphi 2006
« previous next »
Pages: [1] Print
Author Topic: Problems with Dunit and a Romote Data Module in Delphi 2006  (Read 403 times)
CharlesF
Newbie
*
Posts: 9


View Profile
Problems with Dunit and a Romote Data Module in Delphi 2006
« on: August 01, 2007, 01:41:44 AM »

Hi
I am busy setting up a dUnit test in Delphi 2006

The area I am trying test is in a TRomoteDataModule

when I create and running the test I get  the following Error -

EOleSysError with message 'Error loading type library/Dll'

Have any of you done go dunit working on a RDM module ?
Is there any differnet that you had to do to make it work ?

Charles
Logged
jdawkins
Administrator
Newbie
*****
Posts: 14


View Profile
Re: Problems with Dunit and a Romote Data Module in Delphi 2006
« Reply #1 on: August 01, 2007, 11:12:55 AM »

I'm not sure but you probably need a call to CoInitialize in your test before you create the RDM.

I haven't had the opportunity to write anything with an RDM so I haven't tried this.

- Jody
Logged
CharlesF
Newbie
*
Posts: 9


View Profile
Re: Problems with Dunit and a Romote Data Module in Delphi 2006
« Reply #2 on: August 28, 2007, 02:42:09 PM »

I now have a solution to DUnit testing of a RDM

==> 
The main problem is BDS2006 does not create a Type Libary for then RDM in the test project

If the initialization part of the code is gets removed - one can convert the RDM into a data module
and then do tests on it.

i.e.

{$IFNDEF TESTMODE}
initialization TComponentFactory.Create(ComServer, TBetProcessRDM, Class_BetProcessRDM, ciMultiInstance, tmApartment);
{$ENDIF}

Charles
Logged
jdawkins
Administrator
Newbie
*****
Posts: 14


View Profile
Re: Problems with Dunit and a Romote Data Module in Delphi 2006
« Reply #3 on: August 29, 2007, 08:08:55 AM »

Thanks for posting your solution!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP delphixtreme | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!