Integration testing help?

Thread is closed for posting
3 posts, 0 answers
  1. Jules
    Jules avatar
    20 posts
    Member since:
    Jul 2005

    Posted 03 Sep 2010 Link to this post

    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

    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?

  2. Jules
    Jules avatar
    20 posts
    Member since:
    Jul 2005

    Posted 06 Sep 2010 Link to this post

    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?
  3. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 06 Sep 2010 Link to this post

    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
Back to Top