Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Unit Testing with mbunit/ DAL+
Previous Previous
 
Next Next
New Post 6/30/2008 5:05 AM
User is offline jimmy
7 posts
10th Ranked


Unit Testing with mbunit/ DAL+ 

hi,

im currently trying to get some unit tests for a custom DNN module to run. The problem i am running into is when i try to fetch an instance of the DAL+ DataProvider-

[code]

DataProvider d = DotNetNuke.Data.DataProvider.Instance();

[/code]

 

When this code is executed, the following error occurs:

 

System.TypeInitializationException: The type initializer for 'DotNetNuke.Data.DataProvider' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache)
   at DotNetNuke.Data.DataProvider.CreateProvider()
   at DotNetNuke.Data.DataProvider..cctor()
   --- End of inner exception stack trace ---

 

ive been scouring every post on DNN module testing and ive turned up nothing (except something about DNN reflection and making sure all references are present and correct, which they seem to be), if anyone could help me out i would be very grateful.

 

 
New Post 6/30/2008 7:38 AM
User is offline Jim Bonnie
117 posts
www.walkspoiled.com
9th Ranked






Re: Unit Testing with mbunit/ DAL+ 
Modified By Jim Bonnie  on 6/30/2008 9:39:18 AM)

Jimmy,

I have not tried to unit test against the DAL+. It is likely that it is not fully constructed when trying to call it from your unit/integration tests.

Can you isolate your logic so that it can be tested without the DAL, providing dummy data ?

I have had more success using other Data Access tools that can be instiantiated without the DNN core Framework.

Have you tried Subsonic ?


Jim www.walkspoiled.com
 
New Post 6/30/2008 9:10 AM
User is offline james luck
1 posts
10th Ranked


Re: Unit Testing with mbunit/ DAL+ 

Hi Jim, thanks for the response

i think seperating my logic from the DAL would be a bit fustrating and wouldnt achieve that much, i want to check that when i pass in paramaters for the DAL to execute that they have been correctly passed, typed etc.

i will be looking into subsonic, it looks like a very useful tool, thanks for the FYI!

 
New Post 7/1/2008 11:43 AM
User is offline Jim Bonnie
117 posts
www.walkspoiled.com
9th Ranked






Re: Unit Testing with mbunit/ DAL+ 

 

Here is a link to the DNN Unit testing Project on codeplex, http://www.codeplex.com/TestDrivenDNNModule

It may shed some light on how to achieve what your after.

Good Luck.

 


Jim www.walkspoiled.com
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Unit Testing with mbunit/ DAL+
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com
Sunset Hill Solutions - Consulting and Development
We offer general DNN consulting services - including custom module development and commercial module integration/setup.
www.sunsethill.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP