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 ?