Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection String in App.config
Message
From
04/11/2003 19:38:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Connection String in App.config
Miscellaneous
Thread ID:
00846270
Message ID:
00846270
Views:
50
Hi:
I am attempting to set up the Jumpstart business object example for use with NUnit. In doing this I needed to add an app.config to the Order System Business Objects CSharp project and manipulate the Database key to work with my machine. This is what i get based on using the connection string in another project:
	<databases>
		<add key="Northwind" value="workstation id=MIKE;packet size=4096;integrated security=SSPI;data source=(local);persist security info=False;initial catalog=Northwind"/>
	</databases>
I added the key="Northwind" to a connection string copied from another project.
I have a test as follows:
		public void TestGetOrderByCustomerID()
		{
			Orders order = new Orders();
			DataSet ds = order.GetOrderByOrderID( 1 );
			Assert.AreEqual(ds.Tables["Orders"].Rows.Count, 0 ); 
		}
which i'm assuming will fail. What im getting instead of a failure is an
error from the insided of MM:

TestCase 'Acme.OrderSystem.Business.TestOrders.TestGetOrderByCustomerID'
failed: System.NullReferenceException : Object reference not set to an
instance of an object.
at OakLeaf.MM.Main.Business.mmBusinessObject.CreateDataSet()

I realize this is partial information - but any suggestions?

Mike
Reply
Map
View

Click here to load this message in the networking platform