Skip to content

Commit 57a5ed2

Browse files
committed
Small test fixes
1 parent 65a12ea commit 57a5ed2

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/NHibernate.Test/Async/NHSpecificTest/GH2552/Fixture.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010

1111
using System;
1212
using System.Collections.Generic;
13-
using System.Reflection;
14-
using NHibernate.Cache;
13+
using System.Linq;
1514
using NHibernate.Stat;
16-
using NHibernate.Test.CacheTest.Caches;
1715
using NUnit.Framework;
1816
using NHCfg = NHibernate.Cfg;
17+
using NHibernate.Linq;
1918

2019
namespace NHibernate.Test.NHSpecificTest.GH2552
2120
{
@@ -133,15 +132,14 @@ protected override void OnTearDown()
133132
using (ITransaction tx = s.BeginTransaction())
134133
{
135134
// Get the first person with details.
136-
Person person = await (s.QueryOver<TPerson>()
135+
Person person = await (s.Query<TPerson>()
137136
.Where(p => p.Details != null)
138137
.Take(1)
139138
.SingleOrDefaultAsync(cancellationToken));
140139

141140
Assert.NotNull(person);
142141
Assert.NotNull(person.Details);
143142

144-
await (s.SaveOrUpdateAsync(person, cancellationToken));
145143
person.Details = null;
146144

147145
await (tx.CommitAsync(cancellationToken));

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Reflection;
4-
using NHibernate.Cache;
3+
using System.Linq;
54
using NHibernate.Stat;
6-
using NHibernate.Test.CacheTest.Caches;
75
using NUnit.Framework;
86
using NHCfg = NHibernate.Cfg;
97

@@ -121,15 +119,14 @@ private int DeleteDetailsFromFirstPerson<TPerson>() where TPerson:Person
121119
using (ITransaction tx = s.BeginTransaction())
122120
{
123121
// Get the first person with details.
124-
Person person = s.QueryOver<TPerson>()
122+
Person person = s.Query<TPerson>()
125123
.Where(p => p.Details != null)
126124
.Take(1)
127125
.SingleOrDefault();
128126

129127
Assert.NotNull(person);
130128
Assert.NotNull(person.Details);
131129

132-
s.SaveOrUpdate(person);
133130
person.Details = null;
134131

135132
tx.Commit();

0 commit comments

Comments
 (0)