Skip to content

Commit f56c975

Browse files
committed
Fix indenting.
1 parent 3c01e61 commit f56c975

File tree

4 files changed

+84
-90
lines changed

4 files changed

+84
-90
lines changed
Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using NHibernate.Proxy;
6-
using NHibernate.Proxy.DynamicProxy;
7-
1+

82
namespace NHibernate.Test.NHSpecificTest.NH3641
93
{
10-
public interface IEntity
11-
{
12-
int Id { get; set; }
13-
bool Flag { get; set; }
14-
Entity ChildConcrete { get; set; }
15-
IEntity ChildInterface { get; set; }
16-
}
4+
public interface IEntity
5+
{
6+
int Id { get; set; }
7+
bool Flag { get; set; }
8+
Entity ChildConcrete { get; set; }
9+
IEntity ChildInterface { get; set; }
10+
}
1711

18-
public class Entity : IEntity
19-
{
20-
public virtual int Id { get; set; }
21-
public virtual bool Flag { get; set; }
22-
public virtual Entity ChildConcrete { get; set; }
23-
public virtual IEntity ChildInterface { get; set; }
24-
}
12+
public class Entity : IEntity
13+
{
14+
public virtual int Id { get; set; }
15+
public virtual bool Flag { get; set; }
16+
public virtual Entity ChildConcrete { get; set; }
17+
public virtual IEntity ChildInterface { get; set; }
18+
}
2519
}

src/NHibernate.Test/NHSpecificTest/NH3641/Mappings.hbm.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
33
assembly="NHibernate.Test"
44
namespace="NHibernate.Test.NHSpecificTest.NH3641">
5-
6-
<class name="Entity" table="Entity" lazy="true">
7-
<id name="Id" access="property" column="Id" type="Int32" unsaved-value="0">
8-
<generator class="assigned" />
9-
</id>
10-
11-
<property name="Flag" type="Boolean">
12-
<column name="Flag" not-null="true" />
13-
</property>
14-
15-
<many-to-one name="ChildConcrete" access="property" class="Entity" column="ChildConcreteId" lazy="proxy" />
16-
<many-to-one name="ChildInterface" access="property" class="Entity" column="ChildInterfaceId" lazy="proxy" />
17-
</class>
18-
19-
</hibernate-mapping>
5+
6+
<class name="Entity" table="Entity" lazy="true">
7+
<id name="Id" access="property" column="Id" type="Int32" unsaved-value="0">
8+
<generator class="assigned" />
9+
</id>
10+
11+
<property name="Flag" type="Boolean">
12+
<column name="Flag" not-null="true" />
13+
</property>
14+
15+
<many-to-one name="ChildConcrete" access="property" class="Entity" column="ChildConcreteId" lazy="proxy" />
16+
<many-to-one name="ChildInterface" access="property" class="Entity" column="ChildInterfaceId" lazy="proxy" />
17+
</class>
18+
19+
</hibernate-mapping>

src/NHibernate.Test/NHSpecificTest/NH3641/TestFixture.cs

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,60 @@
44

55
namespace NHibernate.Test.NHSpecificTest.NH3641
66
{
7-
public class TestFixture : BugTestCase
8-
{
9-
protected override void OnSetUp()
10-
{
11-
using (var session = OpenSession())
12-
using (var tx = session.BeginTransaction())
13-
{
14-
var child = new Entity { Id = 1, Flag = true };
15-
var parent = new Entity { Id = 2, ChildInterface = child, ChildConcrete = child };
7+
public class TestFixture : BugTestCase
8+
{
9+
protected override void OnSetUp()
10+
{
11+
using (var session = OpenSession())
12+
using (var tx = session.BeginTransaction())
13+
{
14+
var child = new Entity {Id = 1, Flag = true};
15+
var parent = new Entity {Id = 2, ChildInterface = child, ChildConcrete = child};
1616

17-
session.Save(child);
18-
session.Save(parent);
17+
session.Save(child);
18+
session.Save(parent);
1919

20-
tx.Commit();
21-
}
22-
}
20+
tx.Commit();
21+
}
22+
}
2323

24-
protected override void OnTearDown()
25-
{
26-
using (var session = OpenSession())
27-
using (var tx = session.BeginTransaction())
28-
{
29-
DeleteAll<Entity>(session);
30-
tx.Commit();
31-
}
32-
}
24+
protected override void OnTearDown()
25+
{
26+
using (var session = OpenSession())
27+
using (var tx = session.BeginTransaction())
28+
{
29+
DeleteAll<Entity>(session);
30+
tx.Commit();
31+
}
32+
}
3333

34-
private static void DeleteAll<T>(ISession session)
35-
{
36-
session.CreateQuery("delete from " + typeof(T).Name).ExecuteUpdate();
37-
}
34+
private static void DeleteAll<T>(ISession session)
35+
{
36+
session.CreateQuery("delete from " + typeof (T).Name).ExecuteUpdate();
37+
}
3838

39-
[Test]
40-
public void TrueOrChildPropertyConcrete()
41-
{
42-
using (var session = OpenSession())
43-
{
44-
var result = session.Query<IEntity>()
45-
.Where(x => x.ChildConcrete == null || x.ChildConcrete.Flag)
46-
.ToList();
47-
Assert.That(result, Has.Count.EqualTo(2));
48-
}
49-
}
39+
[Test]
40+
public void TrueOrChildPropertyConcrete()
41+
{
42+
using (var session = OpenSession())
43+
{
44+
var result = session.Query<IEntity>()
45+
.Where(x => x.ChildConcrete == null || x.ChildConcrete.Flag)
46+
.ToList();
47+
Assert.That(result, Has.Count.EqualTo(2));
48+
}
49+
}
5050

51-
[Test]
52-
public void TrueOrChildPropertyInterface()
53-
{
54-
using (var session = OpenSession())
55-
{
56-
var result = session.Query<IEntity>()
57-
.Where(x => x.ChildInterface == null || ((Entity) x.ChildInterface).Flag)
58-
.ToList();
59-
Assert.That(result, Has.Count.EqualTo(2));
60-
}
61-
}
62-
}
63-
}
51+
[Test]
52+
public void TrueOrChildPropertyInterface()
53+
{
54+
using (var session = OpenSession())
55+
{
56+
var result = session.Query<IEntity>()
57+
.Where(x => x.ChildInterface == null || ((Entity) x.ChildInterface).Flag)
58+
.ToList();
59+
Assert.That(result, Has.Count.EqualTo(2));
60+
}
61+
}
62+
}
63+
}

src/NHibernate/Linq/ReWriters/AddJoinsReWriter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class AddJoinsReWriter : QueryModelVisitorBase, IIsEntityDecider
1919
private readonly ResultOperatorAndOrderByJoinDetector _resultOperatorAndOrderByJoinDetector;
2020
private readonly WhereJoinDetector _whereJoinDetector;
2121

22-
private AddJoinsReWriter(ISessionFactoryImplementor sessionFactory, QueryModel queryModel)
22+
private AddJoinsReWriter(ISessionFactoryImplementor sessionFactory, QueryModel queryModel)
2323
{
2424
_sessionFactory = sessionFactory;
2525
var joiner = new Joiner(queryModel);
@@ -28,7 +28,7 @@ private AddJoinsReWriter(ISessionFactoryImplementor sessionFactory, QueryModel q
2828
_whereJoinDetector = new WhereJoinDetector(this, joiner);
2929
}
3030

31-
public static void ReWrite(QueryModel queryModel, ISessionFactoryImplementor sessionFactory)
31+
public static void ReWrite(QueryModel queryModel, ISessionFactoryImplementor sessionFactory)
3232
{
3333
new AddJoinsReWriter(sessionFactory, queryModel).VisitQueryModel(queryModel);
3434
}
@@ -55,7 +55,7 @@ public override void VisitWhereClause(WhereClause whereClause, QueryModel queryM
5555

5656
public bool IsEntity(System.Type type)
5757
{
58-
return _sessionFactory.GetImplementors(type.FullName).Any();
58+
return _sessionFactory.GetImplementors(type.FullName).Any();
5959
}
6060

6161
public bool IsIdentifier(System.Type type, string propertyName)

0 commit comments

Comments
 (0)