Click here to Skip to main content
15,887,394 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am making a project and testing it for nUnit.
Currently i have a persistant layer (BookingDA.cs), a business layer (BookingCreation.cs), a controller layer (BookingController.cs) and my nUnit test page (TestBooking.cs).

pastebin of each code can be found here
bookingDA
BookingCreation.cs
BookingController.cs
TestBooking.cs

Currently whenever i build and run the nUnit test i get a

TestFixtures.TestBooking.createNewClient:
System.Exception : Exception of type 'System.Exception' was thrown.

with nUnit point to

testbooking.cs line 24

and

BookingController.cs line 29.

I was wondering if anyone could point out where i was screwing up. and im expecting it to be something really simple that i have overlooked.
Posted
v4
Comments
Ankur\m/ 17-Apr-13 4:35am    
The code is throwing an exception. That means something is wrong somewhere. It seems the catch block in your BookingController is catching the exception. Attach a debugger and see the exception message. That will help you find the reason and thus a solution to the problem.
Sibsy 17-Apr-13 8:24am    
Ive worked out some of the problems now but i have hit another brick wall with NUnit.

A redditor helped me out here and if you wanna see everything we have done

http://www.reddit.com/r/csharp/comments/1cisl3/could_someone_point_me_in_the_right_direction/

Just now im having issues with NUnit getting BadImageFormatException

I remade the project in 3.5 and x86 and still were getting errors
in 4.0 and x64 i was getting ACE.oledb.12.0 provider is not registered on the local machine and when i changed from the .accdb to the mdb and used jet.oledb.4.0 i was getting that jet.oledb.4.0 povider is no registered on the local machine even though i created the databases on this computer.
I have essentially hit a brick wall and thinking of sleeping on it and trying it tomorrow. might have to program from scratch and see if it will work on my laptop instead.
Ankur\m/ 17-Apr-13 5:08am    
@Tadit Dash - the edit wasn't required here.
Ok, thanks... I am undoing now.
Ankur\m/ 17-Apr-13 6:12am    
Please don't edit it again and again. It moves the question up in the list. People may have already seen it and other recent question goes down in the list.
Edit only if required and not every question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900