Skip to content

Commit 975c576

Browse files
committed
minor
1 parent 91e9437 commit 975c576

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Src/NHibernate.Envers.Tests/OneStrategyTestBase.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ namespace NHibernate.Envers.Tests
1616
{
1717
public abstract class OneStrategyTestBase
1818
{
19+
private ISessionFactory _sessionFactory;
20+
private IAuditReader _auditReader;
21+
1922
protected string TestAssembly { get; private set; }
2023
protected Cfg.Configuration Cfg { get; private set; }
2124
protected ISession Session { get; private set; }
2225
protected System.Type StrategyType { get; private set; }
23-
private ISessionFactory SessionFactory { get; set; }
24-
private IAuditReader _auditReader;
2526

2627
protected OneStrategyTestBase(AuditStrategyForTest strategyType)
2728
{
@@ -53,30 +54,30 @@ public void BaseSetup()
5354
Cfg.Configure(configurationFile());
5455
addMappings();
5556
Cfg.IntegrateWithEnvers(new AuditEventListener(), EnversConfiguration());
56-
SessionFactory = Cfg.BuildSessionFactory();
57+
_sessionFactory = Cfg.BuildSessionFactory();
5758
var notRun = TestShouldNotRunMessage();
5859
if (!string.IsNullOrEmpty(notRun))
5960
Assert.Ignore(notRun);
60-
Session = openSession(SessionFactory);
61+
Session = openSession(_sessionFactory);
6162
Initialize();
6263
closeSessionAndAuditReader();
63-
Session = openSession(SessionFactory);
64+
Session = openSession(_sessionFactory);
6465
}
6566

6667
[TearDown]
6768
public void BaseTearDown()
6869
{
6970
closeSessionAndAuditReader();
7071
AuditConfiguration.Remove(Cfg);
71-
SessionFactory?.Close();
72+
_sessionFactory?.Close();
7273
}
7374

7475
protected virtual string TestShouldNotRunMessage()
7576
{
7677
return null;
7778
}
7879

79-
protected Dialect.Dialect Dialect => ((ISessionFactoryImplementor)SessionFactory).Dialect;
80+
protected Dialect.Dialect Dialect => ((ISessionFactoryImplementor)_sessionFactory).Dialect;
8081

8182
protected virtual IMetaDataProvider EnversConfiguration()
8283
{
@@ -118,7 +119,7 @@ private string nameSpaceAssemblyExtracted()
118119
protected void ForceNewSession()
119120
{
120121
Session.Close();
121-
Session = SessionFactory.OpenSession();
122+
Session = _sessionFactory.OpenSession();
122123
_auditReader = null;
123124
}
124125

0 commit comments

Comments
 (0)