Skip to content

Commit

Permalink
Fixup StringAssert NUnit references
Browse files Browse the repository at this point in the history
  • Loading branch information
jas88 committed Nov 27, 2023
1 parent 9b936d4 commit 6672528
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/FAnsiTests/Aggregation/AggregationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected DiscoveredTable GetTestTable(DatabaseType type, bool easy = false)
var dic = easy ? _easyTables : _hardTables;

if (!dic.ContainsKey(type))
Assert.Inconclusive("No connection string found for Test database type {0}", type);
Assert.Inconclusive($"No connection string found for Test database type {type}");

return dic[type];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using NUnit.Framework.Legacy;

namespace FAnsiTests.Aggregation;

Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/CrossPlatformTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using FAnsi.Discovery.QuerySyntax;
using FAnsiTests.TypeTranslation;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;
using TypeGuesser.Deciders;

Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Parameters/ParameterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NUnit.Framework;
using System.Data;
using System.Text;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.Parameters;
Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Query/QuerySyntaxHelperDatabaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using FAnsi;
using FAnsi.Discovery.QuerySyntax;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FAnsiTests.Query;

Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Query/QuerySyntaxHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using FAnsi.Discovery.QuerySyntax;
using FAnsi.Implementation;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FAnsiTests.Query;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using FAnsi.Implementations.Oracle;
using FAnsi.Implementations.PostgreSql;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FAnsiTests.Server;

Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Table/BulkInsertTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using FAnsi.Discovery.QuerySyntax;
using FAnsi.Exceptions;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.Table;
Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Table/CreateTableTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using FAnsi.Discovery.TableCreation;
using FAnsi.Extensions;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.Table;
Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Table/ForeignKeyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using FAnsi.Discovery;
using FAnsi.Discovery.Constraints;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.Table;
Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Table/LongNamesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using FAnsi;
using FAnsi.Discovery;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.Table;
Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/Table/TableValuedFunctionTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Linq;
using FAnsi;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FAnsiTests.Table;

Expand Down
1 change: 1 addition & 0 deletions Tests/FAnsiTests/TypeTranslation/DatatypeComputerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using FAnsi.Discovery.TypeTranslation;
using FAnsi.Implementations.MicrosoftSQL;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using TypeGuesser;

namespace FAnsiTests.TypeTranslation;
Expand Down
4 changes: 2 additions & 2 deletions Tests/FAnsiTests/TypeTranslation/TypeTranslaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ private void RunKnownTypeTest(DatabaseType type, string sqlType, Type expectedTy
Assert.Multiple(() =>
{
//was the Type REQUESTED correct according to the test case expectation
Assert.That(tBefore, Is.EqualTo(expectedType), "We asked to create a '{0}', DBMS created a '{1}'. FAnsi decided that '{0}' is '{2}' and that '{1}' is '{3}'", sqlType, col.DataType.SQLType, tBefore, tAfter);
Assert.That(tBefore, Is.EqualTo(expectedType), $"We asked to create a '{sqlType}', DBMS created a '{col.DataType.SQLType}'. FAnsi decided that '{sqlType}' is '{tBefore}' and that '{col.DataType.SQLType}' is '{tAfter}'");
//Was the Type CREATED matching the REQUESTED type (as far as FAnsi is concerned)
Assert.That(tAfter, Is.EqualTo(tBefore), "We asked to create a '{0}', DBMS created a '{1}'. FAnsi decided that '{0}' is '{2}' and that '{1}' is '{3}'", sqlType, col.DataType.SQLType, tBefore, tAfter);
Assert.That(tAfter, Is.EqualTo(tBefore), $"We asked to create a '{sqlType}', DBMS created a '{col.DataType.SQLType}'. FAnsi decided that '{sqlType}' is '{tBefore}' and that '{col.DataType.SQLType}' is '{tAfter}'");
});

if (!string.Equals(col.DataType.SQLType,sqlType,StringComparison.CurrentCultureIgnoreCase))
Expand Down

0 comments on commit 6672528

Please sign in to comment.