Skip to content

Commit 8555759

Browse files
Update to NH5.2
And some cleanup
1 parent 50d900d commit 8555759

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

NHibernate.Caches.Common.Tests/BinaryCacheSerializerFixture.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
62
using NUnit.Framework;
73

84
namespace NHibernate.Caches.Common.Tests

NHibernate.Caches.Common.Tests/CacheSerializerFixture.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,31 @@ protected List<object> CreateListOfObjects()
184184
protected CacheEntry CreateCacheEntry()
185185
{
186186
var types = GetNHibernateTypes();
187-
return new CacheEntry(types.Values.ToArray(), null, false, null, null, null);
187+
return CacheEntry.Create(types.Values.ToArray(), null, false, null, null, null);
188188
}
189189

190190
// TODO: make tests after upgraded to NHiberante 5.2
191191
protected CollectionCacheEntry CreateCollectionCacheEntry()
192192
{
193-
return new CollectionCacheEntry(null, null);
193+
return CollectionCacheEntry.Create(null, null);
194194
}
195195

196196
// TODO: make tests after upgraded to NHiberante 5.2
197197
protected CacheLock CreateCacheLock()
198198
{
199-
return new CacheLock(1234, 1, 5);
199+
return new CacheLock
200+
{
201+
Timeout = 1234, Id = 1, Version = 5
202+
};
200203
}
201204

202205
// TODO: make tests after upgraded to NHiberante 5.2
203206
protected CachedItem CreateCachedItem(object data)
204207
{
205-
return new CachedItem(data, 111, 5);
208+
return new CachedItem
209+
{
210+
Value = data, FreshTimestamp = 111, Version = 5
211+
};
206212
}
207213

208214
// TODO: make tests after upgraded to NHiberante 5.2
@@ -263,7 +269,7 @@ protected Dictionary<IType, object> GetNHibernateTypes()
263269
{NHibernateUtil.YesNo, true},
264270
// TODO: enable after upgraded to NHiberante 5.2
265271
//{NHibernateUtil.Class, typeof(IType)},
266-
{NHibernateUtil.ClassMetaType, entityName},
272+
{NHibernateUtil.MetaType, entityName},
267273
{NHibernateUtil.Serializable, new CustomEntity {Id = 1}},
268274
// TODO: enable after upgraded to NHiberante 5.2
269275
//{NHibernateUtil.Object, new CustomEntity {Id = 10}},

NHibernate.Caches.Common/CacheSerializerBase.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
7-
namespace NHibernate.Caches.Common
1+
namespace NHibernate.Caches.Common
82
{
93
/// <summary>
104
/// Base class for serializing objects that will be stored in a distributed cache.

NHibernate.Caches.Common/NHibernate.Caches.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<None Include="default.build" Link="default.build" />
1818
</ItemGroup>
1919
<ItemGroup>
20-
<PackageReference Include="NHibernate" Version="5.1.0" />
20+
<PackageReference Include="NHibernate" Version="5.2.0" />
2121
</ItemGroup>
2222
<ItemGroup>
2323
<Content Include="../readme.md">

Util/NHibernate.Caches.Util.JsonSerializer.Tests/JsonCacheSerializerFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
42
using System.Linq;
53
using System.Reflection;
6-
using System.Text;
74
using Newtonsoft.Json.Serialization;
85
using NHibernate.Caches.Common;
96
using NHibernate.Caches.Common.Tests;
10-
using NHibernate.Intercept;
11-
using NHibernate.Properties;
127
using NUnit.Framework;
138

149
namespace NHibernate.Caches.Util.JsonSerializer.Tests

0 commit comments

Comments
 (0)