Skip to content

Commit 0d92dd8

Browse files
authored
Fix NUnit2050 warnings in tests (#3522)
1 parent 3e1c0f0 commit 0d92dd8

File tree

48 files changed

+143
-148
lines changed

Some content is hidden

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

48 files changed

+143
-148
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ dotnet_diagnostic.NUnit2006.severity = suggestion
2525
dotnet_diagnostic.NUnit2015.severity = suggestion
2626
dotnet_diagnostic.NUnit2031.severity = suggestion
2727
dotnet_diagnostic.NUnit2049.severity = suggestion
28-
# NUnit 4 no longer supports string.Format specification for Assert
29-
dotnet_diagnostic.NUnit2050.severity = suggestion
3028
# The SameAs constraint always fails on value types as the actual and the expected value cannot be the same reference
3129
dotnet_diagnostic.NUnit2040.severity = suggestion
3230

src/NHibernate.Test/Async/Criteria/Lambda/IntegrationFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public async Task MultiCriteriaAsync()
358358
{
359359
var driver = Sfi.ConnectionProvider.Driver;
360360
if (!driver.SupportsMultipleQueries)
361-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
361+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
362362

363363
await (SetupPagingDataAsync());
364364

src/NHibernate.Test/Async/Criteria/ProjectionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public async Task UsingSqlFunctions_Concat_WithCastAsync()
9191
{
9292
if(Dialect is Oracle8iDialect)
9393
{
94-
Assert.Ignore("Not supported by the active dialect:{0}.", Dialect);
94+
Assert.Ignore($"Not supported by the active dialect:{Dialect}.");
9595
}
9696
if (TestDialect.HasBrokenTypeInferenceOnSelectedParameters)
9797
Assert.Ignore("Current dialect does not support this test");

src/NHibernate.Test/Async/Criteria/SelectModeTest/SelectModeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ public async Task FetchModeEagerForEagerAsync()
663663
private void SkipFutureTestIfNotSupported()
664664
{
665665
if (Sfi.ConnectionProvider.Driver.SupportsMultipleQueries == false)
666-
Assert.Ignore("Driver {0} does not support multi-queries", Sfi.ConnectionProvider.Driver.GetType().FullName);
666+
Assert.Ignore($"Driver {Sfi.ConnectionProvider.Driver.GetType().FullName} does not support multi-queries");
667667
}
668668

669669
#region Test Setup

src/NHibernate.Test/Async/Extralazy/ExtraLazyFixture.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public async Task ListAddAsync(bool initialize)
114114
// Have to skip unloaded (non-queued indeed) elements to avoid triggering existence queries on them.
115115
foreach (var item in addedItems.Skip(5))
116116
{
117-
Assert.That(gavin.Companies.Contains(item), Is.True, "Company '{0}' existence", item.Name);
117+
Assert.That(gavin.Companies.Contains(item), Is.True, $"Company '{item.Name}' existence");
118118
}
119119

120120
Assert.That(Sfi.Statistics.FlushCount, Is.EqualTo(0), "Flushes count after checking existence of non-flushed");
@@ -322,7 +322,7 @@ public async Task ListInsertAsync(bool initialize)
322322
// Have to skip unloaded (non-queued indeed) elements to avoid triggering existence queries on them.
323323
foreach (var item in addedItems.Skip(5))
324324
{
325-
Assert.That(gavin.Companies.Contains(item), Is.True, "Company '{0}' existence", item.Name);
325+
Assert.That(gavin.Companies.Contains(item), Is.True, $"Company '{item.Name}' existence");
326326
}
327327

328328
Assert.That(Sfi.Statistics.FlushCount, Is.EqualTo(0), "Flushes count after existence check");
@@ -636,7 +636,7 @@ public async Task ListGetSetAsync(bool initialize)
636636
Sfi.Statistics.Clear();
637637
for (var i = 0; i < 10; i++)
638638
{
639-
Assert.That(gavin.Companies[i], Is.EqualTo(addedItems[i]), "Comparing added company at index {0}", i);
639+
Assert.That(gavin.Companies[i], Is.EqualTo(addedItems[i]), $"Comparing added company at index {i}");
640640
}
641641

642642
Assert.That(Sfi.Statistics.FlushCount, Is.EqualTo(0), "Flushes count after adding comparing");
@@ -676,7 +676,7 @@ public async Task ListGetSetAsync(bool initialize)
676676
Sfi.Statistics.Clear();
677677
for (var i = 0; i < 10; i++)
678678
{
679-
Assert.That(gavin.Companies[i].ListIndex, Is.EqualTo(finalIndexOrder[i]), "Comparing company ListIndex at index {0}", i);
679+
Assert.That(gavin.Companies[i].ListIndex, Is.EqualTo(finalIndexOrder[i]), $"Comparing company ListIndex at index {i}");
680680
}
681681

682682
Assert.That(Sfi.Statistics.FlushCount, Is.EqualTo(0), "Flushes count after comparing");
@@ -798,7 +798,7 @@ public async Task ListFlushAsync(bool initialize)
798798
{
799799
for (var i = 15; i < 20; i++)
800800
{
801-
Assert.That(gavin.Companies.Remove(addedItems[i]), Is.True, "Removing transient company at index {0}", i);
801+
Assert.That(gavin.Companies.Remove(addedItems[i]), Is.True, $"Removing transient company at index {i}");
802802
}
803803

804804
Assert.That(FindAllOccurrences(sqlLog.GetWholeLog(), "INSERT \n INTO"), Is.EqualTo(10), "Statements count after removing");
@@ -909,7 +909,7 @@ public async Task ListFlushAsync(bool initialize)
909909

910910
for (var i = 0; i < gavin.Companies.Count; i++)
911911
{
912-
Assert.That(gavin.Companies[i].ListIndex, Is.EqualTo(i), "Comparing company ListIndex at index {0}", i);
912+
Assert.That(gavin.Companies[i].ListIndex, Is.EqualTo(i), $"Comparing company ListIndex at index {i}");
913913
}
914914

915915
if (initialize)
@@ -1049,7 +1049,7 @@ public async Task ListClearAsync(bool initialize)
10491049
Assert.That(collection.Count, Is.EqualTo(6), "Credit cards count after loading again Gavin");
10501050
for (var i = 0; i < 10; i++)
10511051
{
1052-
Assert.That(collection.Contains(addedItems[i]), i < 6 ? Is.True : (IResolveConstraint) Is.False, "Checking existence for item at {0}", i);
1052+
Assert.That(collection.Contains(addedItems[i]), i < 6 ? Is.True : (IResolveConstraint) Is.False, $"Checking existence for item at {i}");
10531053
}
10541054

10551055
Assert.That(NHibernateUtil.IsInitialized(collection), Is.False, "Credit cards initialization status after loading again");
@@ -1140,7 +1140,7 @@ public async Task ListIndexOperationsAsync(bool initialize)
11401140

11411141
for (var i = 0; i < gavin.Companies.Count; i++)
11421142
{
1143-
Assert.That(gavin.Companies[i].OriginalIndex, Is.EqualTo(finalIndexOrder[i]), "Comparing company index at {0}", i);
1143+
Assert.That(gavin.Companies[i].OriginalIndex, Is.EqualTo(finalIndexOrder[i]), $"Comparing company index at {i}");
11441144
}
11451145

11461146
if (initialize)
@@ -1882,8 +1882,7 @@ public async Task SetClearAsync(bool initialize)
18821882
Assert.That(collection.Count, Is.EqualTo(6), "Permissions count after loading again Gavin");
18831883
for (var i = 0; i < 10; i++)
18841884
{
1885-
Assert.That(collection.Contains(addedItems[i]), i < 6 ? Is.True : (IResolveConstraint) Is.False,
1886-
"Checking existence of added element at {0}", i);
1885+
Assert.That(collection.Contains(addedItems[i]), i < 6 ? Is.True : (IResolveConstraint) Is.False, $"Checking existence of added element at {i}");
18871886
}
18881887

18891888
Assert.That(NHibernateUtil.IsInitialized(collection), Is.False, "Permissions initialization status after loading again");

src/NHibernate.Test/Async/Hql/Ast/BulkManipulation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ public async Task SimpleDeleteOnAnimalAsync()
884884
{
885885
if (Dialect.HasSelfReferentialForeignKeyBug)
886886
{
887-
Assert.Ignore("self referential FK bug", "HQL delete testing");
887+
Assert.Ignore("self referential FK bug - HQL delete testing");
888888
return;
889889
}
890890

src/NHibernate.Test/Async/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public async Task ReturnedValueIsGuidAsync()
4343
}
4444
catch (NotSupportedException)
4545
{
46-
Assert.Ignore("This test does not apply to {0}", Dialect.Dialect.GetDialect());
46+
Assert.Ignore($"This test does not apply to {Dialect.Dialect.GetDialect()}");
4747
}
4848

4949
var gen = new NativeGuidGenerator();

src/NHibernate.Test/Async/Linq/FunctionTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ where lowerName.IndexOf('a') == 0
204204
select lowerName;
205205
var result = await (query.ToListAsync());
206206

207-
Assert.That(result, Is.EqualTo(expected), "Expected {0} but was {1}", string.Join("|", expected), string.Join("|", result));
207+
Assert.That(result, Is.EqualTo(expected), $"Expected {string.Join("|", expected)} but was {string.Join("|", result)}");
208208
await (ObjectDumper.WriteAsync(query));
209209
}
210210

@@ -220,7 +220,7 @@ where lowerName.IndexOf('a', 2) == -1
220220
select lowerName;
221221
var result = await (query.ToListAsync());
222222

223-
Assert.That(result, Is.EqualTo(expected), "Expected {0} but was {1}", string.Join("|", expected), string.Join("|", result));
223+
Assert.That(result, Is.EqualTo(expected), $"Expected {string.Join("|", expected)} but was {string.Join("|", result)}");
224224
await (ObjectDumper.WriteAsync(query));
225225
}
226226

@@ -236,7 +236,7 @@ where lowerName.IndexOf("an") == 0
236236
select lowerName;
237237
var result = await (query.ToListAsync());
238238

239-
Assert.That(result, Is.EqualTo(expected), "Expected {0} but was {1}", string.Join("|", expected), string.Join("|", result));
239+
Assert.That(result, Is.EqualTo(expected), $"Expected {string.Join("|", expected)} but was {string.Join("|", result)}");
240240
await (ObjectDumper.WriteAsync(query));
241241
}
242242

@@ -252,7 +252,7 @@ where lowerName.Contains("a")
252252
select lowerName.IndexOf("a", 1);
253253
var result = await (query.ToListAsync());
254254

255-
Assert.That(result, Is.EqualTo(expected), "Expected {0} but was {1}", string.Join("|", expected), string.Join("|", result));
255+
Assert.That(result, Is.EqualTo(expected), $"Expected {string.Join("|", expected)} but was {string.Join("|", result)}");
256256
await (ObjectDumper.WriteAsync(query));
257257
}
258258

src/NHibernate.Test/Async/NHSpecificTest/NH1253/Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public async Task MultiQuerySingleInListAsync()
8585
{
8686
var driver = Sfi.ConnectionProvider.Driver;
8787
if (!driver.SupportsMultipleQueries)
88-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
88+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
8989

9090
using (var s = OpenSession())
9191
using (var tx = s.BeginTransaction())

src/NHibernate.Test/Async/NHSpecificTest/NH1612/NativeSqlCollectionLoaderFixture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public async Task LoadEntityCollectionWithCustomLoaderAsync()
244244
[Test]
245245
public async Task NativeUpdateQueryWithoutResultsAsync()
246246
{
247-
Assume.That(Dialect, Is.InstanceOf<MsSql2000Dialect>(), "This does not apply to {0}", Dialect);
247+
Assume.That(Dialect, Is.InstanceOf<MsSql2000Dialect>(), $"This does not apply to {Dialect}");
248248
Assume.That(WithQueryCache, Is.False, "This test does not use a cacheable query.");
249249
using (ISession session = OpenSession())
250250
{
@@ -259,7 +259,7 @@ public async Task NativeUpdateQueryWithoutResultsAsync()
259259
[Test]
260260
public async Task NativeScalarQueryWithoutResultsAsync()
261261
{
262-
Assume.That(Dialect, Is.InstanceOf<MsSql2000Dialect>(), "This does not apply to {0}", Dialect);
262+
Assume.That(Dialect, Is.InstanceOf<MsSql2000Dialect>(), $"This does not apply to {Dialect}");
263263
Assume.That(WithQueryCache, Is.False, "This test does not use a cacheable query.");
264264
using (ISession session = OpenSession())
265265
{
@@ -278,7 +278,7 @@ public async Task NativeScalarQueryWithUndefinedResultsetAsync()
278278
{
279279
if (!(Dialect is MsSql2000Dialect))
280280
{
281-
Assert.Ignore("This does not apply to {0}", Dialect);
281+
Assert.Ignore($"This does not apply to {Dialect}");
282282
}
283283
using (ISession session = OpenSession())
284284
{
@@ -301,7 +301,7 @@ public async Task NativeScalarQueryWithDefinedResultsetAsync()
301301
{
302302
if (!(Dialect is MsSql2000Dialect))
303303
{
304-
Assert.Ignore("This does not apply to {0}", Dialect);
304+
Assert.Ignore($"This does not apply to {Dialect}");
305305
}
306306
using (ISession session = OpenSession())
307307
{

src/NHibernate.Test/Async/NHSpecificTest/NH2195/SQLiteMultiCriteriaTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public async Task MultiCriteriaQueriesWithIntsShouldExecuteCorrectlyAsync()
102102
{
103103
var driver = Sfi.ConnectionProvider.Driver;
104104
if (!driver.SupportsMultipleQueries)
105-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
105+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
106106

107107
// Test querying IntData
108108
using (ISession session = this.OpenSession())
@@ -131,7 +131,7 @@ public async Task MultiCriteriaQueriesWithStringsShouldExecuteCorrectlyAsync()
131131
{
132132
var driver = Sfi.ConnectionProvider.Driver;
133133
if (!driver.SupportsMultipleQueries)
134-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
134+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
135135

136136
// Test querying StringData
137137
using (ISession session = this.OpenSession())

src/NHibernate.Test/Async/NHSpecificTest/NH3023/DeadlockConnectionPoolIssueTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public async Task ConnectionPoolCorruptionAfterDeadlockAsync(bool distributed, b
124124
//
125125
// ? This shouldn't happen
126126
//
127-
Assert.Fail("Surprising exception when trying to force a deadlock: {0}", x);
127+
Assert.Fail($"Surprising exception when trying to force a deadlock: {x}");
128128
}
129129

130130
_log.WarnFormat("Initial session seemingly not deadlocked at attempt {0}", tryCount);
@@ -254,11 +254,11 @@ public async Task ConnectionPoolCorruptionAfterDeadlockAsync(bool distributed, b
254254
}
255255
}
256256

257-
Assert.Fail("{0}; {1} subsequent requests failed.",
258-
missingDeadlock
259-
? "Deadlock not reported on initial request, and initial request failed"
260-
: "Initial request failed",
261-
subsequentFailedRequests);
257+
Assert.Fail(
258+
missingDeadlock
259+
? $"Deadlock not reported on initial request, and initial request failed; {subsequentFailedRequests} subsequent requests failed."
260+
: $"Initial request failed; {subsequentFailedRequests} subsequent requests failed.");
261+
262262
} while (tryCount < 3);
263263
//
264264
// I'll change this to while(true) sometimes so I don't have to keep running the test

src/NHibernate.Test/Async/NHSpecificTest/NH3952/Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ public static MethodInfo GetMethodDefinition2<T, TResult>(Func<T, TResult> func,
106106
return method.IsGenericMethod ? method.GetGenericMethodDefinition() : method;
107107
}
108108
}
109-
}
109+
}

src/NHibernate.Test/Async/NHSpecificTest/NH940/NH940Fixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task BugAsync()
4848
}
4949
catch (Exception e)
5050
{
51-
Assert.Fail("Should have thrown MyException, thrown {0} instead", e);
51+
Assert.Fail($"Should have thrown MyException, thrown {e} instead");
5252
}
5353
}
5454

src/NHibernate.Test/Async/NHSpecificTest/SqlConverterAndMultiQuery/Fixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void MultiHqlShouldThrowUserExceptionAsync()
5454
{
5555
var driver = Sfi.ConnectionProvider.Driver;
5656
if (!driver.SupportsMultipleQueries)
57-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
57+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
5858

5959
using (var s = OpenSession())
6060
using (s.BeginTransaction())
@@ -96,7 +96,7 @@ public void MultiCriteriaShouldThrowUserExceptionAsync()
9696
{
9797
var driver = Sfi.ConnectionProvider.Driver;
9898
if (!driver.SupportsMultipleQueries)
99-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
99+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
100100

101101
using (var s = OpenSession())
102102
using (s.BeginTransaction())

src/NHibernate.Test/Async/SystemTransactions/DistributedSystemTransactionFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,11 @@ public async Task CanUseSessionOutsideOfScopeAfterScopeAsync(bool explicitFlush)
528528
}
529529
var count = 0;
530530
Assert.DoesNotThrowAsync(async () => count = await (s.Query<Person>().CountAsync()), "Failed using the session after scope.");
531-
if (count != 1)
531+
const int expectedCount = 1;
532+
if (count != expectedCount)
532533
// We are not testing that here, so just issue a warning. Do not use DodgeTransactionCompletionDelayIfRequired
533534
// before previous assert. We want to ascertain the session is usable in any cases.
534-
Assert.Warn("Unexpected entity count: {0} instead of {1}. The transaction seems to have a delayed commit.", count, 1);
535+
Assert.Warn($"Unexpected entity count: {count} instead of {expectedCount}. The transaction seems to have a delayed commit.");
535536
}
536537
}
537538

src/NHibernate.Test/Async/SystemTransactions/SystemTransactionFixture.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,11 @@ public async Task CanUseSessionOutsideOfScopeAfterScopeAsync(bool explicitFlush)
296296
}
297297
var count = 0;
298298
Assert.DoesNotThrowAsync(async () => count = await (s.Query<Person>().CountAsync()), "Failed using the session after scope.");
299-
if (count != 1)
299+
const int expectedCount = 1;
300+
if (count != expectedCount)
300301
// We are not testing that here, so just issue a warning. Do not use DodgeTransactionCompletionDelayIfRequired
301302
// before previous assert. We want to ascertain the session is usable in any cases.
302-
Assert.Warn("Unexpected entity count: {0} instead of {1}. The transaction seems to have a delayed commit.", count, 1);
303+
Assert.Warn($"Unexpected entity count: {count} instead of {expectedCount}. The transaction seems to have a delayed commit.");
303304
}
304305
}
305306

@@ -644,10 +645,9 @@ public async Task SupportsTransactionTimeoutAsync()
644645
Assert.That(
645646
_unhandledExceptions.Count,
646647
Is.EqualTo(0),
647-
"Unhandled exceptions have occurred: {0}",
648-
string.Join(@"
648+
$"Unhandled exceptions have occurred: {string.Join(@"
649649
650-
", _unhandledExceptions));
650+
", _unhandledExceptions)}");
651651

652652
// Despite the Thread sleep and the count of entities to load, this test may get the timeout only for slightly
653653
// more than 10% of the attempts.

src/NHibernate.Test/Async/Tools/hbm2ddl/SchemaValidator/SchemaValidateTableWithSchemaFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected override void CreateSchema()
6464
{
6565
// Unfortunateley Assert.Warn and Console.WriteLine at this place seems to be ignored in Rider
6666
// viewer.
67-
Assert.Warn("Creating the schema failed, assuming it already exists. {0}", ex);
67+
Assert.Warn($"Creating the schema failed, assuming it already exists. {ex}");
6868
Console.WriteLine("Creating the schema failed, assuming it already exists.");
6969
Console.WriteLine(ex);
7070
}
@@ -113,7 +113,7 @@ public async Task ShouldVerifyAsync()
113113
}
114114
catch (SchemaValidationException sve)
115115
{
116-
Assert.Fail("Validation failed: {0}.\n{1}", StringHelper.CollectionToString(sve.ValidationErrors), sve);
116+
Assert.Fail($"Validation failed: {StringHelper.CollectionToString(sve.ValidationErrors)}.\n{sve}");
117117
}
118118
}
119119
}

src/NHibernate.Test/ConnectionTest/AsyncLocalSessionContextFixture.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ private void AssertCurrentSession(ISession session, string message)
5858
Assert.That(
5959
Sfi.GetCurrentSession(),
6060
Is.EqualTo(session),
61-
"{0} {1} instead of {2}.", message,
62-
Sfi.GetCurrentSession().GetSessionImplementation().SessionId,
63-
session.GetSessionImplementation().SessionId);
61+
$"{message} {Sfi.GetCurrentSession().GetSessionImplementation().SessionId} instead of {session.GetSessionImplementation().SessionId}.");
6462
}
6563
}
66-
}
64+
}

src/NHibernate.Test/ConnectionTest/ThreadStaticSessionContextFixture.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ private void AssertCurrentSession(ISessionFactory factory, ISession session, str
7979
Assert.That(
8080
factory.GetCurrentSession(),
8181
Is.EqualTo(session),
82-
"{0} {1} instead of {2}.", message,
83-
factory.GetCurrentSession().GetSessionImplementation().SessionId,
84-
session.GetSessionImplementation().SessionId);
82+
$"{message} {factory.GetCurrentSession().GetSessionImplementation().SessionId} instead of {session.GetSessionImplementation().SessionId}.");
8583
}
8684
}
87-
}
85+
}

src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public void MultiCriteria()
346346
{
347347
var driver = Sfi.ConnectionProvider.Driver;
348348
if (!driver.SupportsMultipleQueries)
349-
Assert.Ignore("Driver {0} does not support multi-queries", driver.GetType().FullName);
349+
Assert.Ignore($"Driver {driver.GetType().FullName} does not support multi-queries");
350350

351351
SetupPagingData();
352352

src/NHibernate.Test/Criteria/ProjectionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void UsingSqlFunctions_Concat_WithCast()
8080
{
8181
if(Dialect is Oracle8iDialect)
8282
{
83-
Assert.Ignore("Not supported by the active dialect:{0}.", Dialect);
83+
Assert.Ignore($"Not supported by the active dialect:{Dialect}.");
8484
}
8585
if (TestDialect.HasBrokenTypeInferenceOnSelectedParameters)
8686
Assert.Ignore("Current dialect does not support this test");

0 commit comments

Comments
 (0)