Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Desktop Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Search

XML Feeds

Google Ads

Tags: nunit

comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

In some cases, you want to have a file in your Startupfolder that you want to access from within your application. Perhaps an XML-file with application settings or an image that can be changed.

In most cases the application startuppath will be in program files so you don't really want to put too much stuff in there but from time to time, you might.

And I always like to test if the pesky file is configured right, so that it appears as a file in that folder.

For example, if I have an image that has this as a path:

Read More...
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

Like the title says An nUnit testfixture file template for resharper that also conforms to stylecop laws. Here it is.

csharp Sample Code (See Article for Rest)
Read More...
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

Today I noticed that my integration tests with nhibernate were runnning very slow on the build server. Very slow meaning 1 hour to run while they run for 6 minutes on my dev machine all 840 of them. Something was different.

I am using Finalbuilder 5.5 on my build machine and that uses the nunit console to do the dirty work for it.

So I tried running it in the nuint gui tool and there too it was slow.

So I clicked a bit on the tabs, one never knows when one might get lucky and low and behold I was lucky. The Log tab of the GUi builder was getting lots of work.

I ...

Read More...
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

When you try to instantiate a windowsforms control in your NUnit test, you could get the following error:

System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.

This has something to do with the fact that windows forms controls like to run in STA (Single threaded apartment) and the latests version of Nunit run as MTA (Multi Threaded apartment).

After some googling (which only returned a small numbe...

Read More...
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

Let’s say we want to test to see if our object really throws that event when we need it to.

vbnet Sample Code (See Article for Rest)
Read More...