Skip to content

Commit dcb6723

Browse files
committed
async regen
1 parent 6f69c4f commit dcb6723

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+13
-2040
lines changed

src/NHibernate.Test/Async/NHSpecificTest/Dates/DateTimeOffsetFixture.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
namespace NHibernate.Test.NHSpecificTest.Dates
2323
{
2424
using System.Threading.Tasks;
25-
using System.Threading;
2625
[TestFixture]
2726
public class DateTimeOffsetFixtureAsync : FixtureBaseAsync
2827
{
@@ -76,22 +75,5 @@ public async Task SavingAndRetrievingTestAsync()
7675
await (tx.CommitAsync());
7776
}
7877
}
79-
80-
[Test]
81-
public async Task NextAsync()
82-
{
83-
var type = NHibernateUtil.DateTimeOffset;
84-
var current = DateTimeOffset.Now.AddTicks(-1);
85-
object next = await (type.NextAsync(current, null, CancellationToken.None));
86-
87-
Assert.That(next, Is.TypeOf<DateTimeOffset>().And.Property("Ticks").GreaterThan(current.Ticks));
88-
}
89-
90-
[Test]
91-
public async Task SeedAsync()
92-
{
93-
var type = NHibernateUtil.DateTimeOffset;
94-
Assert.That(await (type.SeedAsync(null, CancellationToken.None)), Is.TypeOf<DateTimeOffset>());
95-
}
9678
}
9779
}

src/NHibernate.Test/Async/TypesTest/AbstractDateTimeTypeFixture.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
namespace NHibernate.Test.TypesTest
2929
{
3030
using System.Threading.Tasks;
31-
using System.Threading;
3231
[TestFixture]
3332
public abstract class AbstractDateTimeTypeFixtureAsync : TypeFixtureBase
3433
{
@@ -85,33 +84,6 @@ protected override void DropSchema()
8584
base.DropSchema();
8685
}
8786

88-
[Test]
89-
public async Task NextAsync()
90-
{
91-
// Take some margin, as DbTimestampType takes its next value from the database, which
92-
// may have its clock a bit shifted even if running on the same server. (Seen with PostgreSQL,
93-
// off by a few seconds, and with SAP HANA running in a vm, off by twenty seconds.)
94-
var current = Now.Subtract(TimeSpan.FromMinutes(2));
95-
var next = await (Type.NextAsync(current, null, CancellationToken.None));
96-
97-
Assert.That(next, Is.TypeOf<DateTime>(), "next should be DateTime");
98-
Assert.That(next, Is.GreaterThan(current), "next should be greater than current");
99-
}
100-
101-
[Test]
102-
public async Task SeedAsync()
103-
{
104-
Assert.That(await (Type.SeedAsync(null, CancellationToken.None)), Is.TypeOf<DateTime>(), "seed should be DateTime");
105-
}
106-
107-
[Test]
108-
public async Task ComparerAsync()
109-
{
110-
var v1 = await (Type.SeedAsync(null, CancellationToken.None));
111-
var v2 = Now.Subtract(TimeSpan.FromTicks(DateAccuracyInTicks));
112-
Assert.That(() => Type.Comparator.Compare(v1, v2), Throws.Nothing);
113-
}
114-
11587
[Test]
11688
[TestCase(DateTimeKind.Unspecified)]
11789
[TestCase(DateTimeKind.Local)]

src/NHibernate.Test/Async/TypesTest/DateTimeOffsetTypeFixture.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
namespace NHibernate.Test.TypesTest
2323
{
2424
using System.Threading.Tasks;
25-
using System.Threading;
2625
[TestFixture]
2726
public class DateTimeOffsetTypeFixtureAsync : TypeFixtureBase
2827
{
@@ -87,22 +86,6 @@ protected override void DropSchema()
8786
base.DropSchema();
8887
}
8988

90-
[Test]
91-
public async Task NextAsync()
92-
{
93-
var current = DateTimeOffset.Parse("2004-01-01");
94-
var next = await (Type.NextAsync(current, null, CancellationToken.None));
95-
96-
Assert.That(next, Is.TypeOf<DateTimeOffset>(), "next should be DateTimeOffset");
97-
Assert.That(next, Is.GreaterThan(current), "next should be greater than current");
98-
}
99-
100-
[Test]
101-
public async Task SeedAsync()
102-
{
103-
Assert.That(await (Type.SeedAsync(null, CancellationToken.None)), Is.TypeOf<DateTimeOffset>(), "seed should be DateTime");
104-
}
105-
10689
[Test]
10790
public async Task ReadWriteAsync()
10891
{

src/NHibernate.Test/Async/TypesTest/Int16TypeFixture.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/NHibernate.Test/Async/TypesTest/Int32TypeFixture.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/NHibernate.Test/Async/TypesTest/Int64TypeFixture.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/NHibernate.Test/Async/TypesTest/TimeAsTimeSpanTypeFixture.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,6 @@
1515
namespace NHibernate.Test.TypesTest
1616
{
1717
using System.Threading.Tasks;
18-
using System.Threading;
19-
/// <summary>
20-
/// Summary description for TimeAsTimeSpanTypeFixture.
21-
/// </summary>
22-
[TestFixture]
23-
public class TimeAsTimeSpanTypeFixtureAsync
24-
{
25-
[Test]
26-
public async Task NextAsync()
27-
{
28-
var type = (TimeAsTimeSpanType) NHibernateUtil.TimeAsTimeSpan;
29-
object current = new TimeSpan(DateTime.Now.Ticks - 5);
30-
object next = await (type.NextAsync(current, null, CancellationToken.None));
31-
32-
Assert.IsTrue(next is TimeSpan, "Next should be TimeSpan");
33-
Assert.IsTrue((TimeSpan) next > (TimeSpan) current,
34-
"next should be greater than current (could be equal depending on how quickly this occurs)");
35-
}
36-
37-
[Test]
38-
public async Task SeedAsync()
39-
{
40-
var type = (TimeAsTimeSpanType) NHibernateUtil.TimeAsTimeSpan;
41-
Assert.IsTrue(await (type.SeedAsync(null, CancellationToken.None)) is TimeSpan, "seed should be TimeSpan");
42-
}
43-
}
4418

4519
[TestFixture]
4620
public class TimeSpanFixture2Async : TypeFixtureBase

src/NHibernate.Test/Async/TypesTest/TimeSpanTypeFixture.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,6 @@
1515
namespace NHibernate.Test.TypesTest
1616
{
1717
using System.Threading.Tasks;
18-
using System.Threading;
19-
/// <summary>
20-
/// Summary description for TimeSpanTypeFixture.
21-
/// </summary>
22-
[TestFixture]
23-
public class TimeSpanTypeFixtureAsync
24-
{
25-
[Test]
26-
public async Task NextAsync()
27-
{
28-
var type = (TimeSpanType) NHibernateUtil.TimeSpan;
29-
object current = new TimeSpan(DateTime.Now.Ticks - 5);
30-
object next = await (type.NextAsync(current, null, CancellationToken.None));
31-
32-
Assert.IsTrue(next is TimeSpan, "Next should be TimeSpan");
33-
Assert.IsTrue((TimeSpan) next > (TimeSpan) current,
34-
"next should be greater than current (could be equal depending on how quickly this occurs)");
35-
}
36-
37-
[Test]
38-
public async Task SeedAsync()
39-
{
40-
var type = (TimeSpanType) NHibernateUtil.TimeSpan;
41-
Assert.IsTrue(await (type.SeedAsync(null, CancellationToken.None)) is TimeSpan, "seed should be TimeSpan");
42-
}
43-
}
4418

4519
[TestFixture]
4620
public class TimeSpanTypeFixture2Async : TypeFixtureBase

src/NHibernate/Async/Engine/Query/NativeSQLQueryPlan.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task<int> PerformExecuteUpdateAsync(QueryParameters queryParameters
7070

7171
foreach (IParameterSpecification parameterSpecification in parametersSpecifications)
7272
{
73-
await (parameterSpecification.BindAsync(ps, sqlParametersList, queryParameters, session, cancellationToken)).ConfigureAwait(false);
73+
parameterSpecification.Bind(ps, sqlParametersList, queryParameters, session);
7474
}
7575

7676
result = await (session.Batcher.ExecuteNonQueryAsync(ps, cancellationToken)).ConfigureAwait(false);

0 commit comments

Comments
 (0)