From: <fab...@us...> - 2008-11-25 22:22:43
|
Revision: 3926 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3926&view=rev Author: fabiomaulo Date: 2008-11-25 21:31:27 +0000 (Tue, 25 Nov 2008) Log Message: ----------- avoid the name of catalog in test (each one can use a different configuration) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs 2008-11-25 21:27:27 UTC (rev 3925) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs 2008-11-25 21:31:27 UTC (rev 3926) @@ -6,6 +6,7 @@ using NHibernate.Cfg; using NHibernate.Tool.hbm2ddl; using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; namespace NHibernate.Test.Tools.hbm2ddl.SchemaValidator { @@ -26,7 +27,6 @@ } [Test] - [ExpectedException(typeof(HibernateException), ExpectedMessage = "Missing column: Name in nhibernate.dbo.Version")] public void ShouldNotVerifyModifiedTable() { string resource1 = "NHibernate.Test.Tools.hbm2ddl.SchemaValidator.1_Version.hbm.xml"; @@ -39,7 +39,14 @@ v2cfg.AddInputStream(stream); new NHibernate.Tool.hbm2ddl.SchemaExport(v1cfg).Execute(true, true, false, true); var v2schemaValidator = new NHibernate.Tool.hbm2ddl.SchemaValidator((v2cfg)); - v2schemaValidator.Validate(); + try + { + v2schemaValidator.Validate(); + } + catch (HibernateException e) + { + Assert.That(e.Message, Text.StartsWith("Missing column: Name")); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: T. T. <te...@gm...> - 2008-11-25 22:30:41
|
Thanks for the tip! I missed it. On Tue, Nov 25, 2008 at 11:31 PM, <fab...@us...> wrote: > Revision: 3926 > > http://nhibernate.svn.sourceforge.net/nhibernate/?rev=3926&view=rev > Author: fabiomaulo > Date: 2008-11-25 21:31:27 +0000 (Tue, 25 Nov 2008) > > Log Message: > ----------- > avoid the name of catalog in test (each one can use a different > configuration) > > Modified Paths: > -------------- > > trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs > > Modified: > trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs > =================================================================== > --- > trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs > 2008-11-25 21:27:27 UTC (rev 3925) > +++ > trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs > 2008-11-25 21:31:27 UTC (rev 3926) > @@ -6,6 +6,7 @@ > using NHibernate.Cfg; > using NHibernate.Tool.hbm2ddl; > using NUnit.Framework; > +using NUnit.Framework.SyntaxHelpers; > > namespace NHibernate.Test.Tools.hbm2ddl.SchemaValidator > { > @@ -26,7 +27,6 @@ > } > > [Test] > - [ExpectedException(typeof(HibernateException), > ExpectedMessage = "Missing column: Name in nhibernate.dbo.Version")] > public void ShouldNotVerifyModifiedTable() > { > string resource1 = > "NHibernate.Test.Tools.hbm2ddl.SchemaValidator.1_Version.hbm.xml"; > @@ -39,7 +39,14 @@ > v2cfg.AddInputStream(stream); > new > NHibernate.Tool.hbm2ddl.SchemaExport(v1cfg).Execute(true, true, false, > true); > var v2schemaValidator = new > NHibernate.Tool.hbm2ddl.SchemaValidator((v2cfg)); > - v2schemaValidator.Validate(); > + try > + { > + v2schemaValidator.Validate(); > + } > + catch (HibernateException e) > + { > + Assert.That(e.Message, > Text.StartsWith("Missing column: Name")); > + } > } > } > } > > > This was sent by the SourceForge.net collaborative development platform, > the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Nhibernate-commit mailing list > Nhi...@li... > https://lists.sourceforge.net/lists/listinfo/nhibernate-commit > -- Tuna Toksöz http://www.tunatoksoz.com Typos included to enhance the readers attention! |