EntropyZero Blogging Server

Welcome to EntropyZero Blogging Server Sign in | Join | Help

Reply to an Existing Message

The message you are replying to: problems with DataFreshInstance.RefreshTheDatabase();
Anonymous wrote the following post at 11-09-2006 6:32 AM:

Hi

I've tried to  start testing on sql2005 with DataFresh but found a problem.

I downloaded your dataFresh sample and tried to implement 2 test cases.
Thats what I had:

 public class ExportStatesLoggerDalcTests:TestFixtureBase
    {

        [Test]
        public void AddDbName_DbNameNotExists_ReturnsId()
        {
            EntitiesLoggerDalc dalc = new EntitiesLoggerDalc();

            int i = dalc.AddDbName("NewDataName123");
            Assert.Greater(i, 0);
        }

        [Test]
        public void FindDbId_DbNameExists_ReturnsDbId()
        {
            EntitiesLoggerDalc dalc = new EntitiesLoggerDalc();
            int? i = dalc.FindDbId("DbId1"); //in Setup.sql  I insert this entity.
            Assert.IsNotNull(i); //Fails, my table is empty.
        }}


I found, that when my second test runs all data is being erased after
                DataFreshInstance.RefreshTheDatabase();

but I expected, that the data inserted in Setup.sql is in my tables. Am I right ?
 


   
Tags

Powered by Community Server, by Telligent Systems