Skip to content

Commit 7425b0e

Browse files
committed
Different compilation warnings in tests fixed
1 parent 5010b3d commit 7425b0e

File tree

6 files changed

+31
-36
lines changed

6 files changed

+31
-36
lines changed

Orm/Xtensive.Orm.Tests.Sql/Sqlite/MiscTests.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2011-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Malisa Ncube
55
// Created: 2011.05.13
66

@@ -79,11 +79,6 @@ private bool CompareExecuteNonQuery(string commandText, ISqlCompileUnit statemen
7979
return true;
8080
}
8181

82-
private SqlCompilationResult Compile(ISqlCompileUnit statement)
83-
{
84-
return sqlDriver.Compile(statement);
85-
}
86-
8782
#endregion
8883

8984
#region Setup and TearDown

Orm/Xtensive.Orm.Tests/Issues/IssueJira0584_IncorrectMappingOfColumnInQuery.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2015 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2015-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Kulakov
55
// Created: 2015.05.21
66

@@ -298,7 +298,7 @@ public OperationType(Guid id)
298298
public class PacioliAccount : EntityBase
299299
{
300300
[Field, Key]
301-
public Guid Id { get; set; }
301+
public new Guid Id { get; set; }
302302

303303
[Field]
304304
public PacioliAccount Parent { get; set; }

Orm/Xtensive.Orm.Tests/Issues/IssueJira0630_IncorrectColumnOrderOfPKIndexOfInterfaceTypes.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2016 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2016-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Dmitri Maximov
55
// Created: 2016.03.31
66

@@ -792,7 +792,7 @@ public interface IHEA : IH, IE, IA
792792
SimpleTestEntity HEAEntityField { get; set; }
793793

794794
[Field]
795-
SimpleStructure AStructureField { get; set; }
795+
new SimpleStructure AStructureField { get; set; }
796796
}
797797

798798
#endregion

Orm/Xtensive.Orm.Tests/Linq/CompiledQueriesWithClosureTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2013 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2013-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Denis Krjuchkov
55
// Created: 2013.12.16
66

@@ -24,7 +24,7 @@ public class TestEntity : Entity
2424

2525
public static class Extensions
2626
{
27-
public static DateTime GetUserTime(this DateTime dateTime, TimeZone zone)
27+
public static DateTime GetUserTime(this DateTime dateTime, TimeZoneInfo _)
2828
{
2929
return dateTime;
3030
}
@@ -57,7 +57,7 @@ public void CompiledQueryTest()
5757
{
5858
using (var session = Domain.OpenSession())
5959
using (var tx = session.OpenTransaction()) {
60-
var zone = TimeZone.CurrentTimeZone;
60+
var zone = TimeZoneInfo.Local;
6161
var query = session.Query.Execute(
6262
q => q.All<TestEntity>().Select(e => e.Value.GetUserTime(zone)));
6363
var result = query.ToList();
@@ -70,7 +70,7 @@ public void DelayedQueryTest()
7070
{
7171
using (var session = Domain.OpenSession())
7272
using (var tx = session.OpenTransaction()) {
73-
var zone = TimeZone.CurrentTimeZone;
73+
var zone = TimeZoneInfo.Local;
7474
var query = session.Query.ExecuteDelayed(
7575
q => q.All<TestEntity>().Select(e => e.Value.GetUserTime(zone)));
7676
var result = query.ToList();

Orm/Xtensive.Orm.Tests/Storage/AsyncSession/AsyncSessionOpeningTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2019 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2019-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Kulakov
55
// Created: 2019.07.12
66

@@ -121,7 +121,7 @@ public async Task Test07()
121121
}
122122

123123
[Test]
124-
public async Task Test08()
124+
public void Test08()
125125
{
126126
var ctSource = new CancellationTokenSource();
127127
ctSource.Cancel();
@@ -132,7 +132,7 @@ public async Task Test08()
132132
}
133133

134134
[Test]
135-
public async Task Test09()
135+
public void Test09()
136136
{
137137
var ctSource = new CancellationTokenSource();
138138
ctSource.Cancel();
@@ -143,7 +143,7 @@ public async Task Test09()
143143
}
144144

145145
[Test]
146-
public async Task Test10()
146+
public void Test10()
147147
{
148148
var ctSource = new CancellationTokenSource();
149149
ctSource.Cancel();
@@ -154,7 +154,7 @@ public async Task Test10()
154154
}
155155

156156
[Test]
157-
public async Task Test11()
157+
public void Test11()
158158
{
159159
var ctSource = new CancellationTokenSource();
160160
ctSource.Cancel();
@@ -194,7 +194,7 @@ public async Task Test14()
194194
}
195195

196196
[Test]
197-
public async Task Test15()
197+
public void Test15()
198198
{
199199
var ctSource = new CancellationTokenSource();
200200
ctSource.Cancel();

Orm/Xtensive.Orm.Tests/Storage/Versioning/Model.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2018 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2018-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Kulakov
55
// Created: 2018.03.02
66

@@ -205,7 +205,7 @@ public interface IMessage : IEntity
205205
long Id { get; }
206206

207207
[Field]
208-
long Version { get; }
208+
new long Version { get; }
209209

210210
[Field]
211211
DateTime Date { get; set; }
@@ -405,7 +405,7 @@ public interface IBagItem : IEntity
405405
long Id { get; }
406406

407407
[Field, Version]
408-
int Version { get; }
408+
new int Version { get; }
409409

410410
[Field]
411411
long SpaceNeeded { get; set; }
@@ -612,7 +612,7 @@ public interface ITeacher : IEntity
612612
long Id { get; }
613613

614614
[Field, Version]
615-
int Version { get; }
615+
new int Version { get; }
616616

617617
[Field]
618618
string FirstName { get; set; }

0 commit comments

Comments
 (0)