Skip to content

Commit 593f3fe

Browse files
committed
Use unwrapped collection to add/remove items
1 parent 9cf5946 commit 593f3fe

File tree

1 file changed

+3
-9
lines changed
  • src/NHibernate.Test/NHSpecificTest/GH3325

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@ namespace NHibernate.Test.NHSpecificTest.GH3325
66
[TestFixture]
77
public class Fixture : BugTestCase
88
{
9-
protected override void OnSetUp()
10-
{
11-
Sfi.Statistics.IsStatisticsEnabled = true;
12-
}
13-
149
protected override void OnTearDown()
1510
{
16-
Sfi.Statistics.IsStatisticsEnabled = false;
1711
using (var session = OpenSession())
1812
using (var transaction = session.BeginTransaction())
1913
{
@@ -34,16 +28,16 @@ public void CanAddChildAfterFlush()
3428
{
3529
var parent = new Entity { Name = "Parent" };
3630
var child = new ChildEntity { Name = "Child" };
37-
parent.Children.Add(child);
31+
var parentChildren = parent.Children;
32+
parentChildren.Add(child);
3833
session.Save(parent);
39-
parent.Children.Remove(child);
34+
parentChildren.Remove(child);
4035
parentId = parent.Id;
4136
childId = child.Id;
4237
t.Commit();
4338
}
4439

4540
using (var session = OpenSession())
46-
using (var _ = session.BeginTransaction())
4741
{
4842
var parent = session.Get<Entity>(parentId);
4943
Assert.That(parent, Is.Not.Null);

0 commit comments

Comments
 (0)