|
1 |
| -using System; |
2 |
| -using System.Collections; |
3 |
| -using System.Collections.Generic; |
4 |
| -using System.Linq; |
5 |
| -using System.Text; |
6 |
| -using NUnit.Framework; |
7 |
| -using NHibernate.Linq; |
8 |
| - |
9 |
| -namespace NHibernate.Test.NHSpecificTest.NH3252 |
10 |
| -{ |
11 |
| - [TestFixture] |
12 |
| - public class Fixture : TestCase |
13 |
| - { |
14 |
| - protected override string MappingsAssembly |
15 |
| - { |
16 |
| - get { return "NHibernate.Test"; } |
17 |
| - } |
18 |
| - |
19 |
| - protected override IList Mappings |
20 |
| - { |
21 |
| - get { return new string[] { "NHSpecificTest.NH3252.Mappings.hbm.xml" }; } |
22 |
| - } |
23 |
| - |
24 |
| - [Test] |
25 |
| - public void VerifyThatWeCanSaveAndLoad() |
26 |
| - { |
27 |
| - using (ISession session = OpenSession()) |
28 |
| - using (ITransaction transaction = session.BeginTransaction()) |
29 |
| - { |
30 |
| - |
31 |
| - session.Save(new Note { Text = new String('0', 9000) }); |
32 |
| - transaction.Commit(); |
33 |
| - } |
34 |
| - |
35 |
| - using (ISession session = OpenSession()) |
36 |
| - using (ITransaction transaction = session.BeginTransaction()) |
37 |
| - { |
38 |
| - |
39 |
| - var note = session.Query<Note>().First(); |
40 |
| - Assert.AreEqual(9000, note.Text.Length); |
41 |
| - } |
42 |
| - } |
43 |
| - |
44 |
| - protected override void OnTearDown() |
45 |
| - { |
46 |
| - using (ISession session = OpenSession()) |
47 |
| - using (ITransaction transaction = session.BeginTransaction()) |
48 |
| - { |
49 |
| - session.Delete("from System.Object"); |
50 |
| - |
51 |
| - session.Flush(); |
52 |
| - transaction.Commit(); |
53 |
| - } |
54 |
| - } |
55 |
| - } |
56 |
| -} |
| 1 | +using System; |
| 2 | +using System.Collections; |
| 3 | +using System.Collections.Generic; |
| 4 | +using System.Linq; |
| 5 | +using System.Text; |
| 6 | +using NUnit.Framework; |
| 7 | +using NHibernate.Linq; |
| 8 | + |
| 9 | +namespace NHibernate.Test.NHSpecificTest.NH3252 |
| 10 | +{ |
| 11 | + [TestFixture] |
| 12 | + public class Fixture : TestCase |
| 13 | + { |
| 14 | + protected override string MappingsAssembly |
| 15 | + { |
| 16 | + get { return "NHibernate.Test"; } |
| 17 | + } |
| 18 | + |
| 19 | + protected override IList Mappings |
| 20 | + { |
| 21 | + get { return new string[] { "NHSpecificTest.NH3252.Mappings.hbm.xml" }; } |
| 22 | + } |
| 23 | + |
| 24 | + [Test] |
| 25 | + public void VerifyThatWeCanSaveAndLoad() |
| 26 | + { |
| 27 | + using (ISession session = OpenSession()) |
| 28 | + using (ITransaction transaction = session.BeginTransaction()) |
| 29 | + { |
| 30 | + |
| 31 | + session.Save(new Note { Text = new String('0', 9000) }); |
| 32 | + transaction.Commit(); |
| 33 | + } |
| 34 | + |
| 35 | + using (ISession session = OpenSession()) |
| 36 | + using (ITransaction transaction = session.BeginTransaction()) |
| 37 | + { |
| 38 | + |
| 39 | + var note = session.Query<Note>().First(); |
| 40 | + Assert.AreEqual(9000, note.Text.Length); |
| 41 | + } |
| 42 | + } |
| 43 | + |
| 44 | + protected override void OnTearDown() |
| 45 | + { |
| 46 | + using (ISession session = OpenSession()) |
| 47 | + using (ITransaction transaction = session.BeginTransaction()) |
| 48 | + { |
| 49 | + session.Delete("from System.Object"); |
| 50 | + |
| 51 | + session.Flush(); |
| 52 | + transaction.Commit(); |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | +} |
0 commit comments