From: Peter S. <sz...@us...> - 2004-04-09 13:53:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23621/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj TestCase.cs Added Files: TestTestCase.cs Log Message: Added test for testcase. Removed ` from dialect again. Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestCase.cs 9 Apr 2004 13:14:54 -0000 1.7 --- TestCase.cs 9 Apr 2004 13:39:48 -0000 1.8 *************** *** 54,59 **** try { ! conn = new SqlConnection("Server=localhost;initial catalog=nhibernate;User ID=someuser;Password=somepwd"); ! conn.Open(); tran = conn.BeginTransaction(); IDbCommand comm = conn.CreateCommand(); --- 54,61 ---- try { ! if (cfg == null) ! cfg = new Configuration(); ! Connection.IConnectionProvider prov = Connection.ConnectionProviderFactory.NewConnectionProvider(cfg.Properties); ! conn = prov.GetConnection(); tran = conn.BeginTransaction(); IDbCommand comm = conn.CreateCommand(); *************** *** 64,76 **** tran.Commit(); } ! catch { ! tran.Rollback(); if (error) ! throw; } finally { ! conn.Close(); } } --- 66,80 ---- tran.Commit(); } ! catch(Exception exc) { ! if (tran != null) ! tran.Rollback(); if (error) ! throw exc; } finally { ! if (conn != null) ! conn.Close(); } } --- NEW FILE: TestTestCase.cs --- using System; using NUnit.Framework; namespace NHibernate.Test { /// <summary> /// Summary description for TestTestCase. /// </summary> [TestFixture] public class TestTestCase : TestCase { [Test] public void TestExecuteStatement() { base.ExecuteStatement("create table yyyy (x int)"); base.ExecuteStatement("drop table yyyy"); } } } Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NHibernate.Test-1.1.csproj 6 Apr 2004 12:56:39 -0000 1.11 --- NHibernate.Test-1.1.csproj 9 Apr 2004 13:39:46 -0000 1.12 *************** *** 203,206 **** --- 203,211 ---- /> <File + RelPath = "TestTestCase.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UnsavedValueTest.cs" SubType = "Code" |