This is a migrated thread and some comments may be shown as answers.

Integration testing help?

2 Answers 81 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jules
Top achievements
Rank 1
Jules asked on 03 Sep 2010, 05:36 PM
I am trying to do some integration testing, checking that a business logic class properly retrieves persistent objects from the data store, which is written against an OpenAccess ORM DAL. To start, I'm writing a test helper method that clears the database so the integration test can control what data is available to be returned. However, when I call Telerik.OpenAccess.Database.Get("myConnectionStringId") I get the following error:

Telerik.OpenAccess.Exceptions.ConfigurationException : The connection section with id 'myConnectionStringId' cannot be found in the configuration files traversed from '(OpenAccess internally generated, maybe web page)'.

Thinking this is something goofy I've done, I've checked just about everything I can think of but to no avail. I've even used ConfigurationManager in the previous line of code to make sure the connection string is truly available in the App.Config file. Also, calls to the DAL from the same test have no problems reaching the connection string (well, at least they don't throw an error and return data.)

I am using OpenAccess 2010.2.714.1. I created the DAL using the "Add Domain Model" wizard. I am testing using NUnit 2.5.7.10213.

I'm sure this is related to calling Database myself. If this is not a recommended method for clearing the data store, can someone point me in a better direction?

Thanks,
J

2 Answers, 1 is accepted

Sort by
0
Jules
Top achievements
Rank 1
answered on 06 Sep 2010, 05:15 AM
I've solved my own problem. I was calling to Telerik.OpenAccess.Database.Get("myconnectionstringid) which threw the error, but when I instead called to the data context generated by OpenAccess, I found that I could use the GetSchemaHandler method and get to CreateDatabase(). Why is it that 90% of my problems are solved when I go to create a sample solution to send in for support?
0
Jan Blessenohl
Telerik team
answered on 06 Sep 2010, 02:57 PM
Hi Julia Essex,
Good to hear. What about the other 10% problems, please feel free to follow up.

Sincerely yours,
Jan Blessenohl
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Development (API, general questions)
Asked by
Jules
Top achievements
Rank 1
Answers by
Jules
Top achievements
Rank 1
Jan Blessenohl
Telerik team
Share this question
or