Skip to content

Commit 010c208

Browse files
committed
Minor fixex
1 parent b90e97d commit 010c208

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

Orm/Xtensive.Orm.Tests/Issues/IssueJira0613_DataCleanUpInPerformSafely.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2016 Xtensive LLC.
1+
// Copyright (C) 2016 Xtensive LLC.
22
// All rights reserved.
33
// For conditions of distribution and use, see license.
44
// Created by: Alexey Kulakov
@@ -184,14 +184,19 @@ private void RunTest(Action populateAction, Action<Session> validateAction, Type
184184
validateAction.Invoke(session);
185185
}
186186
}
187-
else
187+
else {
188188
// In this kind of tests we have only primary keys changed.
189189
// To be clear, only name is changed.
190190
// But MySQL has no named PKs so we have no difference in mysql
191-
if (validationConfiguration.ConnectionInfo.Provider!=WellKnown.Provider.MySql)
192-
Assert.Throws<SchemaSynchronizationException>(() => Domain.Build(validationConfiguration));
193-
else
194-
Assert.DoesNotThrow(()=>Domain.Build(validationConfiguration));
191+
var exception = Assert.Throws<SchemaSynchronizationException>(() => Domain.Build(validationConfiguration));
192+
193+
if (validationConfiguration.ConnectionInfo.Provider != WellKnown.Provider.MySql) {
194+
Assert.That(exception.ComparisonResult, Is.Not.Null);
195+
}
196+
else {
197+
Assert.That(exception.ComparisonResult, Is.Null);
198+
}
199+
}
195200
}
196201
}
197202
}

Orm/Xtensive.Orm.Tests/Issues/Issue_0716_UpgradeFailsInValidateMode/UpgradeTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ namespace Xtensive.Orm.Tests.Issues.Issue_0716_UpgradeFailsInValidateMode
2020
[Ignore("Outdated")]
2121
// Alowing behavior when types moved to different namespace
2222
// can cause problems and corrupt data in database which is unacceptable.
23-
// Relying on t
2423
// As long as Validate mode is expected to be strict we have to forbid
2524
// cases when cross-namespace movements appear.
26-
2725
public class UpgradeTest
2826
{
2927
private Domain domain;

Orm/Xtensive.Orm.Tests/Upgrade/UpgradeContextTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2018 Xtensive LLC.
1+
// Copyright (C) 2018 Xtensive LLC.
22
// All rights reserved.
33
// For conditions of distribution and use, see license.
44
// Created by: Alexey Kulakov
@@ -25,7 +25,7 @@ public class TestEntity : Entity
2525

2626
public class AccessGatherer
2727
{
28-
Dictionary<MethodBase, ProviderInfo> stagesAccess = new Dictionary<MethodBase, ProviderInfo>();
28+
private Dictionary<MethodBase, ProviderInfo> stagesAccess = new Dictionary<MethodBase, ProviderInfo>();
2929

3030
public ProviderInfo this[MethodInfo method]
3131
{
@@ -156,7 +156,7 @@ namespace Xtensive.Orm.Tests.Upgrade
156156
{
157157
public sealed class UpgradeContextTest
158158
{
159-
private static string additionalNodeName = "additional";
159+
private const string additionalNodeName = "additional";
160160
private MethodInfo[] upgraderMethods;
161161

162162
[OneTimeSetUp]

Orm/Xtensive.Orm/Orm/Entity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public abstract class Entity : Persistent,
6969
IDeserializationCallback
7070
{
7171
private static readonly Parameter<Tuple> keyParameter = new Parameter<Tuple>(WellKnown.KeyFieldName);
72+
private readonly bool changeVersionOnSetAttempt;
7273
private EntityState state;
73-
private bool changeVersionOnSetAttempt;
7474

7575
#region Internal properties
7676

Orm/Xtensive.Orm/Orm/EntitySetBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public abstract class EntitySetBase : SessionBound,
4343

4444
private readonly Entity owner;
4545
private readonly CombineTransform auxilaryTypeKeyTransform;
46+
private readonly bool skipOwnerVersionChange;
4647
private bool isInitialized;
47-
private bool skipOwnerVersionChange;
4848

4949
/// <summary>
5050
/// Gets the owner of this instance.

0 commit comments

Comments
 (0)