Problem with Unit testing of ASP.NET project
I'm trying to create a bunch of MS visual studio unit tests for my n-tiered web app but for some reason I can't run those tests and I get the following error - 

> "Object reference not set to an
> instance of an object"

What I'm trying to do is testing of my data access layer where I use LINQ data context class to execute a certain function and return a result,however during the debugging process I found out that all the tests fail as soon as they get to the LINQ data context class and it has something to do with the connection string but I cant figure out what is the problem.

The debugging of tests fails here(the second line):

    public EICDataClassesDataContext() :
        base(global::System.Configuration.ConfigurationManager.ConnectionStrings["EICDatabaseConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
And my test is as follows:

    TestMethod()]
        public void OnGetCustomerIDTest()
        {
            FrontLineStaffDataAccess target = new FrontLineStaffDataAccess(); // TODO: Initialize to an appropriate value
            string regNo = "jonh"; // TODO: Initialize to an appropriate value
            int expected = 10; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.OnGetCustomerID(regNo);
            Assert.AreEqual(expected, actual);
        }
The method which I call from DAL is:

     public int OnGetCustomerID(string regNo)
        {
            using (LINQDataAccess.EICDataClassesDataContext dataContext = new LINQDataAccess.EICDataClassesDataContext())
            {
                IEnumerable<LINQDataAccess.GetCustomerIDResult> sProcCustomerIDResult = dataContext.GetCustomerID(regNo);
                int customerID = sProcCustomerIDResult.First().CustomerID;

                return customerID;
            }
        }

So basically everything fails after it reaches the 1st line of DA layer method and when it tries to instantiate the LINQ data access class...

I've spent around 10 hours trying to troubleshoot the problem but no result...I would really appreciate any help!
Problem with Unit testing of ASP.NET project
===

I'm trying to create a bunch of MS visual studio unit tests for my n-tiered web app but for some reason I can't run those tests and I get the following error - 

> "Object reference not set to an
> instance of an object"

What I'm trying to do is testing of my data access layer where I use LINQ data context class to execute a certain function and return a result,however during the debugging process I found out that all the tests fail as soon as they get to the LINQ data context class and it has something to do with the connection string but I cant figure out what is the problem.

The debugging of tests fails here(the second line):

    public EICDataClassesDataContext() :
        base(global::System.Configuration.ConfigurationManager.ConnectionStrings["EICDatabaseConnectionString"].ConnectionString, mappingSource)
		{
			OnCreated();
		}
And my test is as follows:

    TestMethod()]
        public void OnGetCustomerIDTest()
        {
            FrontLineStaffDataAccess target = new FrontLineStaffDataAccess(); // TODO: Initialize to an appropriate value
            string regNo = "jonh"; // TODO: Initialize to an appropriate value
            int expected = 10; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.OnGetCustomerID(regNo);
            Assert.AreEqual(expected, actual);
        }
The method which I call from DAL is:

     public int OnGetCustomerID(string regNo)
        {
            using (LINQDataAccess.EICDataClassesDataContext dataContext = new LINQDataAccess.EICDataClassesDataContext())
            {
                IEnumerable<LINQDataAccess.GetCustomerIDResult> sProcCustomerIDResult = dataContext.GetCustomerID(regNo);
                int customerID = sProcCustomerIDResult.First().CustomerID;

                return customerID;
            }
        }

So basically everything fails after it reaches the 1st line of DA layer method and when it tries to instantiate the LINQ data access class...

I've spent around 10 hours trying to troubleshoot the problem but no result...I would really appreciate any help!