Skip to content

Commit d164bd6

Browse files
committed
NH-3666 - Fix indent in test files.
1 parent 241e090 commit d164bd6

File tree

3 files changed

+77
-73
lines changed

3 files changed

+77
-73
lines changed

src/NHibernate.Test/NHSpecificTest/NH3666/Entity.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
namespace NHibernate.Test.NHSpecificTest.NH3666
77
{
8-
public class Entity
9-
{
10-
public virtual int Id { get; set; }
11-
public virtual string Property { get; set; }
12-
}
8+
public class Entity
9+
{
10+
public virtual int Id { get; set; }
11+
public virtual string Property { get; set; }
12+
}
1313
}

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

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,70 +6,70 @@
66

77
namespace NHibernate.Test.NHSpecificTest.NH3666
88
{
9-
[TestFixture]
10-
public class Fixture : BugTestCase
11-
{
12-
protected override void OnSetUp()
13-
{
14-
using (var session = this.OpenSession())
15-
using (var transaction = session.BeginTransaction())
16-
{
17-
var entity1 = new Entity { Id = 1, Property = "Test1" };
18-
var entity2 = new Entity { Id = 2, Property = "Test2" };
19-
var entity3 = new Entity { Id = 3, Property = "Test3" };
9+
[TestFixture]
10+
public class Fixture : BugTestCase
11+
{
12+
protected override void OnSetUp()
13+
{
14+
using (var session = this.OpenSession())
15+
using (var transaction = session.BeginTransaction())
16+
{
17+
var entity1 = new Entity { Id = 1, Property = "Test1" };
18+
var entity2 = new Entity { Id = 2, Property = "Test2" };
19+
var entity3 = new Entity { Id = 3, Property = "Test3" };
2020

21-
session.Save(entity1);
22-
session.Save(entity2);
23-
session.Save(entity3);
21+
session.Save(entity1);
22+
session.Save(entity2);
23+
session.Save(entity3);
2424

25-
transaction.Commit();
26-
}
27-
}
25+
transaction.Commit();
26+
}
27+
}
2828

29-
protected override void OnTearDown()
30-
{
31-
using (var session = this.OpenSession())
32-
using (var transaction = session.BeginTransaction())
33-
{
34-
session.Delete("from Entity");
35-
transaction.Commit();
36-
}
37-
}
29+
protected override void OnTearDown()
30+
{
31+
using (var session = this.OpenSession())
32+
using (var transaction = session.BeginTransaction())
33+
{
34+
session.Delete("from Entity");
35+
transaction.Commit();
36+
}
37+
}
3838

39-
[Test]
40-
public void CacheableDoesNotThrowExceptionWithNativeSQLQuery()
41-
{
42-
using (var session = this.OpenSession())
43-
using (var transaction = session.BeginTransaction())
44-
{
45-
var result = session.CreateSQLQuery("SELECT * FROM Entity WHERE Property = 'Test2'")
46-
.AddEntity(typeof(Entity))
47-
.SetCacheable(true)
48-
.List<Entity>();
39+
[Test]
40+
public void CacheableDoesNotThrowExceptionWithNativeSQLQuery()
41+
{
42+
using (var session = this.OpenSession())
43+
using (var transaction = session.BeginTransaction())
44+
{
45+
var result = session.CreateSQLQuery("SELECT * FROM Entity WHERE Property = 'Test2'")
46+
.AddEntity(typeof(Entity))
47+
.SetCacheable(true)
48+
.List<Entity>();
4949

50-
CollectionAssert.IsNotEmpty(result);
50+
CollectionAssert.IsNotEmpty(result);
5151

52-
Assert.AreEqual(1, result.Count);
53-
Assert.AreEqual(2, result[0].Id);
54-
}
55-
}
52+
Assert.AreEqual(1, result.Count);
53+
Assert.AreEqual(2, result[0].Id);
54+
}
55+
}
5656

57-
[Test]
58-
public void CacheableDoesNotThrowExceptionWithNamedQuery()
59-
{
60-
using (var session = this.OpenSession())
61-
using (var transaction = session.BeginTransaction())
62-
{
63-
var result = session.GetNamedQuery("QueryName")
64-
.SetCacheable(true)
65-
.SetString("prop", "Test2")
66-
.List<Entity>();
57+
[Test]
58+
public void CacheableDoesNotThrowExceptionWithNamedQuery()
59+
{
60+
using (var session = this.OpenSession())
61+
using (var transaction = session.BeginTransaction())
62+
{
63+
var result = session.GetNamedQuery("QueryName")
64+
.SetCacheable(true)
65+
.SetString("prop", "Test2")
66+
.List<Entity>();
6767

68-
CollectionAssert.IsNotEmpty(result);
68+
CollectionAssert.IsNotEmpty(result);
6969

70-
Assert.AreEqual(1, result.Count);
71-
Assert.AreEqual(2, result[0].Id);
72-
}
73-
}
74-
}
70+
Assert.AreEqual(1, result.Count);
71+
Assert.AreEqual(2, result[0].Id);
72+
}
73+
}
74+
}
7575
}
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH3666">
3-
<class name="Entity" table="Entity">
4-
<id name="Id" access="property" column="Id" type="Int32" unsaved-value="0">
5-
<generator class="assigned" />
6-
</id>
7-
<property name="Property" type="String" />
8-
</class>
2+
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
3+
assembly="NHibernate.Test"
4+
namespace="NHibernate.Test.NHSpecificTest.NH3666">
5+
6+
<class name="Entity" table="Entity">
7+
<id name="Id" access="property" column="Id" type="Int32" unsaved-value="0">
8+
<generator class="assigned" />
9+
</id>
10+
<property name="Property" type="String" />
11+
</class>
12+
13+
<sql-query name="QueryName">
14+
<return class="Entity" />
15+
SELECT * FROM Entity WHERE Property = :prop
16+
</sql-query>
917

10-
<sql-query name="QueryName">
11-
<return class="Entity" />
12-
SELECT * FROM Entity WHERE Property = :prop
13-
</sql-query>
1418
</hibernate-mapping>

0 commit comments

Comments
 (0)