Forum member

TerryS

8 posts

Posts by TerryS

  1. All Database tests fail with latest version

    Here is what I have done... I created a base test class, which all our other DB test classes will inherit from. [TestClass] public class RepositoryBaseTests { [TestInitialize] public virtual void TestInitialize() { //-- Set the DataDirectory …

  2. All Database tests fail with latest version

    On a further note, when I add AppDomain.CurrentDomain.SetData("DataDirectory", dataDirectory); to a test class method with the [TestInitialize] attribute the class will find and use the Database, however when I do this on the method marked with [AssemblyInitialize] the classes are unable …

  3. All Database tests fail with latest version

    Some success. I added the attributes : [DeploymentItem(@"Resources\MdmTestDb.mdf", "Resources")] [DeploymentItem(@"Resources\MdmTestDb.ldf", "Resources")] To the first class in the test project, and that seems to work, however, the ideal solution would be to have the attributes work on the m…

  4. All Database tests fail with latest version

    Here is the output: C:\Users\terry.sansom\AppData\Local\NCrunch\8428\31\TestResults\bb89c3d7-2699-410d-bbc9-2bc0e38ad722\Out\Resources\MdmTestDb.mdf False Assembly initialize/cleanup failed: System.Data.SqlClient.SqlException (0x80131904): An attempt to attach an auto-named database for file C:\U…

  5. All Database tests fail with latest version

    Ya, that's really not a good solution, in this case if the DB is available it should just use it, and not bail, its a test database, not a resource file - the error message even recognizes it as the database. Would not the best solution be able to adjust the engine - so it sees it is a DB not a fil…

  6. All Database tests fail with latest version

    DataDirectory is the issue; NCrunch uses the same folder across multiple tests. as such, it is behaving badly to error out. The preferred behavior is: If the database is already there, it should use it, not error out. Many test running against a single database. We have multiple tests, a…

  7. All Database tests fail with latest version

    Yes the mdf file is stored with the project, all operations/tests never changes the content of the DB, so it can remain read only. the connection string in the project app.config file is connectionString="Data Source=(localdb)\v11.0;AttachDbFilename=|DataDirectory|\Resource…

  8. All Database tests fail with latest version

    All Database tests fail with latest version. I have tried to eliminate this by setting NCrunch to a single CPU core, and process but it still fails. MS test passes all the tests so it is appears to be an issue with the latest version of NCrunch. All these tests worked fine under the previous vers…