diff --git a/docs/WriteTest.md b/docs/WriteTest.md index 6600032..60cc4f3 100644 --- a/docs/WriteTest.md +++ b/docs/WriteTest.md @@ -204,7 +204,7 @@ By default, with XUnit all the tests will be executed in parallel. Also, our tes will works on the same database. It will not work of course, so it is mean that our tests must be executed in series and not in parallel. -For that, we must add the `Collection` attribute with an unique name to indicate to XUnit that all the tests +For that, we must add the `Collection` attribute with an unique name to indicate to xUnit that all the tests in the class, must not be executed in parallel. We recommand to put the name of the database in the arguments of the `Collection` attribute. diff --git a/samples/DemoApp.DataAccessLayer.Migrations.Tests/DatabaseMigrationTest.cs b/samples/DemoApp.DataAccessLayer.Migrations.Tests/DatabaseMigrationTest.cs index 4d6e41f..bb05aa4 100644 --- a/samples/DemoApp.DataAccessLayer.Migrations.Tests/DatabaseMigrationTest.cs +++ b/samples/DemoApp.DataAccessLayer.Migrations.Tests/DatabaseMigrationTest.cs @@ -8,8 +8,8 @@ namespace PosInformatique.DemoApp.DataAccessLayer.Migrations.Tests { using FluentAssertions; using Microsoft.EntityFrameworkCore; - using PosInformatique.UnitTests.Databases; - using PosInformatique.UnitTests.Databases.SqlServer; + using PosInformatique.Testing.Databases; + using PosInformatique.Testing.Databases.SqlServer; public class DatabaseMigrationTest { diff --git a/samples/DemoApp.DataAccessLayer.Migrations.Tests/DemoApp.DataAccessLayer.Migrations.Tests.csproj b/samples/DemoApp.DataAccessLayer.Migrations.Tests/DemoApp.DataAccessLayer.Migrations.Tests.csproj index a35f5a9..2d29966 100644 --- a/samples/DemoApp.DataAccessLayer.Migrations.Tests/DemoApp.DataAccessLayer.Migrations.Tests.csproj +++ b/samples/DemoApp.DataAccessLayer.Migrations.Tests/DemoApp.DataAccessLayer.Migrations.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/samples/DemoApp.DataAccessLayer.Tests/CustomerRepositoryTest.cs b/samples/DemoApp.DataAccessLayer.Tests/CustomerRepositoryTest.cs index 9b53182..4124519 100644 --- a/samples/DemoApp.DataAccessLayer.Tests/CustomerRepositoryTest.cs +++ b/samples/DemoApp.DataAccessLayer.Tests/CustomerRepositoryTest.cs @@ -7,7 +7,7 @@ namespace PosInformatique.DemoApp.DataAccessLayer.Tests { using FluentAssertions; - using PosInformatique.UnitTests.Databases.SqlServer; + using PosInformatique.Testing.Databases.SqlServer; [Collection(DatabaseName)] public class CustomerRepositoryTest : IClassFixture @@ -30,7 +30,7 @@ public CustomerRepositoryTest(SqlServerDatabaseInitializer initializer) // - Here we force to set the ID of the customer to 15. this.database.InsertInto("Customer", disableIdentityInsert: true, new { Id = 15, FirstName = "Marcel", LastName = "DUPONT", Revenue = 4852.45 }); - // - Here, to simplify the syntax (recommanded approach) we use an extension method in the unit tests project. + // - Here, to simplify the syntax (recommanded approach) we use an extension method in the tests project. // Using extension methods, make the code more readable. // Also, we recommand to force to set the IDENTITY column values explicit to avoid // to update lot of code if you delete some rows later... diff --git a/samples/DemoApp.DataAccessLayer.Tests/DatabaseTestsConnectionStrings.cs b/samples/DemoApp.DataAccessLayer.Tests/DatabaseTestsConnectionStrings.cs index 4fe26ae..a7c02e9 100644 --- a/samples/DemoApp.DataAccessLayer.Tests/DatabaseTestsConnectionStrings.cs +++ b/samples/DemoApp.DataAccessLayer.Tests/DatabaseTestsConnectionStrings.cs @@ -10,7 +10,7 @@ namespace PosInformatique.DemoApp.DataAccessLayer.Tests /// /// This helper allows to centralize the connection string - /// and the creation of the for the unit tests. + /// and the creation of the for the tests. /// public static class DatabaseTestsConnectionStrings { diff --git a/samples/DemoApp.DataAccessLayer.Tests/DemoApp.DataAccessLayer.Tests.csproj b/samples/DemoApp.DataAccessLayer.Tests/DemoApp.DataAccessLayer.Tests.csproj index 14a5068..a4d5b7e 100644 --- a/samples/DemoApp.DataAccessLayer.Tests/DemoApp.DataAccessLayer.Tests.csproj +++ b/samples/DemoApp.DataAccessLayer.Tests/DemoApp.DataAccessLayer.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/samples/DemoApp.DataAccessLayer.Tests/DemoAppDatabaseExtensions.cs b/samples/DemoApp.DataAccessLayer.Tests/DemoAppDatabaseExtensions.cs index f2127b8..0e86818 100644 --- a/samples/DemoApp.DataAccessLayer.Tests/DemoAppDatabaseExtensions.cs +++ b/samples/DemoApp.DataAccessLayer.Tests/DemoAppDatabaseExtensions.cs @@ -6,7 +6,7 @@ namespace PosInformatique.DemoApp.DataAccessLayer.Tests { - using PosInformatique.UnitTests.Databases.SqlServer; + using PosInformatique.Testing.Databases.SqlServer; /// /// Contains static methods to insert data in the database. diff --git a/samples/Directory.Packages.props b/samples/Directory.Packages.props index 2368c62..6728226 100644 --- a/samples/Directory.Packages.props +++ b/samples/Directory.Packages.props @@ -11,7 +11,7 @@ - + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9d8e9cb..688bf32 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -19,7 +19,7 @@ - + <_Parameter1>$(AssemblyName).Tests diff --git a/src/Testing.Databases.SqlServer.Dac/SqlServerDacDatabaseInitializer.cs b/src/Testing.Databases.SqlServer.Dac/SqlServerDacDatabaseInitializer.cs index 72a6562..1724b3e 100644 --- a/src/Testing.Databases.SqlServer.Dac/SqlServerDacDatabaseInitializer.cs +++ b/src/Testing.Databases.SqlServer.Dac/SqlServerDacDatabaseInitializer.cs @@ -9,7 +9,7 @@ namespace PosInformatique.Testing.Databases.SqlServer using Microsoft.Data.SqlClient; /// - /// Initializer used to initialize the database for the unit tests. + /// Initializer used to initialize the database for the tests. /// Call the method to initialize a database from /// a DACPAC file. /// diff --git a/src/Testing.Databases.SqlServer.Dac/Testing.Databases.SqlServer.Dac.csproj b/src/Testing.Databases.SqlServer.Dac/Testing.Databases.SqlServer.Dac.csproj index 0f64095..63d2390 100644 --- a/src/Testing.Databases.SqlServer.Dac/Testing.Databases.SqlServer.Dac.csproj +++ b/src/Testing.Databases.SqlServer.Dac/Testing.Databases.SqlServer.Dac.csproj @@ -3,7 +3,8 @@ net8.0 - Testing.Databases.SqlServer.Dac is a library that contains a set of tools for unit testing to deploy DAC (Data-tier Applications) packages (.dacpac files). + Testing.Databases.SqlServer.Dac is a library that contains a set of tools for testing to deploy DAC (Data-tier Applications) packages (.dacpac files). + testing unittest sqlserver repository tdd dataaccesslayer dacpac dac diff --git a/src/Testing.Databases.SqlServer.EntityFramework/Testing.Databases.SqlServer.EntityFramework.csproj b/src/Testing.Databases.SqlServer.EntityFramework/Testing.Databases.SqlServer.EntityFramework.csproj index f5a8851..403ab7e 100644 --- a/src/Testing.Databases.SqlServer.EntityFramework/Testing.Databases.SqlServer.EntityFramework.csproj +++ b/src/Testing.Databases.SqlServer.EntityFramework/Testing.Databases.SqlServer.EntityFramework.csproj @@ -4,7 +4,7 @@ net8.0 True - Testing.Databases.SqlServer.EntityFramework is a library that contains a set of tools for unit testing Data Access Layer (repositories) based on Entity Framework and SQL Server. + Testing.Databases.SqlServer.EntityFramework is a library that contains a set of tools for testing Data Access Layer (repositories) based on Entity Framework and SQL Server. testing unittest entityframework sqlserver repository tdd dataaccesslayer diff --git a/src/Testing.Databases.SqlServer/SqlServerDatabaseInitializer.cs b/src/Testing.Databases.SqlServer/SqlServerDatabaseInitializer.cs index ea7e881..ea65332 100644 --- a/src/Testing.Databases.SqlServer/SqlServerDatabaseInitializer.cs +++ b/src/Testing.Databases.SqlServer/SqlServerDatabaseInitializer.cs @@ -7,7 +7,7 @@ namespace PosInformatique.Testing.Databases.SqlServer { /// - /// Initializer used to initialize the database for the unit tests. + /// Initializer used to initialize the database for the tests. /// Depending of the strategy to use (initialize from Entity Framework DbContext or .dacpac package) /// add the PosInformatique.Testing.Databases.SqlServer.EntityFramework or PosInformatique.Testing.Databases.SqlServer.Dac /// NuGet packages and call the Initialize() method. diff --git a/src/Testing.Databases.SqlServer/Testing.Databases.SqlServer.csproj b/src/Testing.Databases.SqlServer/Testing.Databases.SqlServer.csproj index bacaedd..6ef4241 100644 --- a/src/Testing.Databases.SqlServer/Testing.Databases.SqlServer.csproj +++ b/src/Testing.Databases.SqlServer/Testing.Databases.SqlServer.csproj @@ -4,8 +4,8 @@ net8.0 True - Testing.Databases.SqlServer is a library that contains a set of tools for unit testing Data Access Layer (repositories) based on SQL Server. - testing nittest sqlserver repository tdd dataaccesslayer + Testing.Databases.SqlServer is a library that contains a set of tools for testing Data Access Layer (repositories) based on SQL Server. + testing unittest sqlserver repository tdd dataaccesslayer diff --git a/tests/Testing.Databases.SqlServer.EntityFramework.Tests/EntityFrameworkDatabaseInitializerExtensionsTest.cs b/tests/Testing.Databases.SqlServer.EntityFramework.Tests/EntityFrameworkDatabaseInitializerExtensionsTest.cs index 2062303..4ab4d63 100644 --- a/tests/Testing.Databases.SqlServer.EntityFramework.Tests/EntityFrameworkDatabaseInitializerExtensionsTest.cs +++ b/tests/Testing.Databases.SqlServer.EntityFramework.Tests/EntityFrameworkDatabaseInitializerExtensionsTest.cs @@ -50,7 +50,7 @@ public void Test1() table.Rows[1]["Name"].Should().Be("Name 2"); // Insert a row which should not be use in other tests. - this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next unit test" }); + this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next test" }); } [Fact] @@ -71,7 +71,7 @@ public void Test2() table.Rows[1]["Name"].Should().Be("Name 2"); // Insert a row which should not be use in other tests. - this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next unit test" }); + this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next test" }); } private sealed class DbContextTest : DbContext diff --git a/tests/Testing.Databases.SqlServer.Tests/SqlServerDatabaseInitializerTest.cs b/tests/Testing.Databases.SqlServer.Tests/SqlServerDatabaseInitializerTest.cs index 0ca11a1..57da907 100644 --- a/tests/Testing.Databases.SqlServer.Tests/SqlServerDatabaseInitializerTest.cs +++ b/tests/Testing.Databases.SqlServer.Tests/SqlServerDatabaseInitializerTest.cs @@ -6,7 +6,7 @@ namespace PosInformatique.Testing.Databases.SqlServer.Tests { - [Collection("PosInformatique.UniTestingtTests.Databases.SqlServer.Tests")] + [Collection("PosInformatique.Testing.Databases.SqlServer.Tests")] public class SqlServerDatabaseInitializerTest : IClassFixture { private const string ConnectionString = $"Data Source=(localDB)\\posinfo-tests; Initial Catalog={nameof(SqlServerDatabaseInitializerTest)}; Integrated Security=True"; @@ -43,7 +43,7 @@ public void Test1() table.Rows[1]["Name"].Should().Be("Name 2"); // Insert a row which should not be use in other tests. - this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next unit test" }); + this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next test" }); } [Fact] @@ -64,7 +64,7 @@ public void Test2() table.Rows[1]["Name"].Should().Be("Name 2"); // Insert a row which should not be use in other tests. - this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next unit test" }); + this.database.InsertInto("MyTable", new { Id = 99, Name = "Should not be here for the next test" }); } } } \ No newline at end of file