Skip to content

Commit 6c14309

Browse files
committed
NH-3252 - Restrict test only to SqlClientDriver
1 parent 015bd6a commit 6c14309

File tree

1 file changed

+12
-18
lines changed
  • src/NHibernate.Test/NHSpecificTest/NH3252

1 file changed

+12
-18
lines changed

src/NHibernate.Test/NHSpecificTest/NH3252/Fixture.cs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
42
using System.Linq;
5-
using System.Text;
6-
using NUnit.Framework;
3+
using NHibernate.Driver;
4+
using NHibernate.Engine;
75
using NHibernate.Linq;
6+
using NUnit.Framework;
87

98
namespace NHibernate.Test.NHSpecificTest.NH3252
109
{
1110
[TestFixture]
12-
public class Fixture : TestCase
11+
public class Fixture : BugTestCase
1312
{
14-
protected override string MappingsAssembly
15-
{
16-
get { return "NHibernate.Test"; }
17-
}
18-
19-
protected override IList Mappings
13+
protected override bool AppliesTo(ISessionFactoryImplementor factory)
2014
{
21-
get { return new string[] { "NHSpecificTest.NH3252.Mappings.hbm.xml" }; }
15+
return factory.ConnectionProvider.Driver is SqlClientDriver;
2216
}
2317

2418
[Test]
2519
public void VerifyThatWeCanSaveAndLoad()
2620
{
27-
using (ISession session = OpenSession())
28-
using (ITransaction transaction = session.BeginTransaction())
21+
using (var session = OpenSession())
22+
using (var transaction = session.BeginTransaction())
2923
{
3024

3125
session.Save(new Note { Text = new String('0', 9000) });
3226
transaction.Commit();
3327
}
3428

35-
using (ISession session = OpenSession())
36-
using (ITransaction transaction = session.BeginTransaction())
29+
using (var session = OpenSession())
30+
using (session.BeginTransaction())
3731
{
3832

3933
var note = session.Query<Note>().First();
@@ -43,8 +37,8 @@ public void VerifyThatWeCanSaveAndLoad()
4337

4438
protected override void OnTearDown()
4539
{
46-
using (ISession session = OpenSession())
47-
using (ITransaction transaction = session.BeginTransaction())
40+
using (var session = OpenSession())
41+
using (var transaction = session.BeginTransaction())
4842
{
4943
session.Delete("from System.Object");
5044

0 commit comments

Comments
 (0)