/* $Id: DataSetControllerTest.cs,v 1.5 2004/10/25 13:47:16 larsbm Exp $
* Copyright (c) 2004 Engine EAR GmbH & Co. KG
* Developed by: Lars Behrmann, lb@engine.de
*/
using System;
using System.Data;
using SQLToNeo.Controller;
using SQLToNeo.Model;
using NUnit.Framework;
namespace SQLToNeo.Tests{
[TestFixture]
public class DataSetControllerTest
{
private DataSetController dsc;
private bool _saveDataSet;
[SetUp]
public void Init()
{
dsc = new DataSetController();
dsc.LoadData("Nothing");
_saveDataSet = false;
}
[Test]
public void CreateDataController()
{
Assert.IsNotNull(dsc.CurrentDataSet);
Assert.IsTrue(dsc.CurrentDataSet.Tables.IndexOf("iforeignkey")>-1, "Must contains table iforeignkey");
Assert.IsTrue(dsc.CurrentDataSet.Tables.IndexOf("foreignkey")>-1, "Must contains table foreignkey");
Assert.IsTrue(dsc.CurrentDataSet.Tables.IndexOf("table")>-1, "Must contains table table");
Assert.IsTrue(dsc.CurrentDataSet.Tables.IndexOf("column")>-1, "Must contains table column");
Assert.IsTrue(dsc.CurrentDataSet.Relations.IndexOf("cols")>-1, "Must contain relation cols");
Assert.IsTrue(dsc.CurrentDataSet.Relations.IndexOf("iforeignkeys")>-1, "Must contain relation iforeignkeys");
Assert.IsTrue(dsc.CurrentDataSet.Relations.IndexOf("foreignkeys")>-1, "Must contain relation foreignkeys");
if(_saveDataSet)
dsc.SaveCurrentDataSet();
}
}
}
/*
* $Log: DataSetControllerTest.cs,v $
* Revision 1.5 2004/10/25 13:47:16 larsbm
* - Add new classes MergeSpecial and MergSpecialTest
* - Merging the current local model with the current db schema on the server
*
* Revision 1.4 2004/10/21 15:39:26 larsbm
* - Add Test for method SpecialMerge(), don't run!
*
* Revision 1.3 2004/10/13 08:53:54 larsbm
* - Start to implement new anaylzer via bridge pattern
* - Adding a test for the new analyzer
*
*
*/
|