From db568557b6147be0d64f2cc26caac1e899c8d148 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 10:57:19 +0000 Subject: [PATCH] Bump xunit from 2.4.2 to 2.5.0 Bumps [xunit](https://github.com/xunit/xunit) from 2.4.2 to 2.5.0. - [Commits](https://github.com/xunit/xunit/compare/2.4.2...2.5.0) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- .../Migrations/MigrationsNpgsqlTest.cs | 8 +++--- .../NpgsqlDatabaseModelFactoryTest.cs | 28 +++++++------------ 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index fa6c6b8cb..ee9d3ac0d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -23,7 +23,7 @@ - + diff --git a/test/EFCore.PG.FunctionalTests/Migrations/MigrationsNpgsqlTest.cs b/test/EFCore.PG.FunctionalTests/Migrations/MigrationsNpgsqlTest.cs index 43cec53bb..aa4a2ccdf 100644 --- a/test/EFCore.PG.FunctionalTests/Migrations/MigrationsNpgsqlTest.cs +++ b/test/EFCore.PG.FunctionalTests/Migrations/MigrationsNpgsqlTest.cs @@ -1994,7 +1994,7 @@ await Test( { var table = Assert.Single(model.Tables); var index = Assert.Single(table.Indexes); - Assert.Equal(1, index.Columns.Count); + Assert.Single(index.Columns); Assert.Contains(table.Columns.Single(c => c.Name == "Name"), index.Columns); // Scaffolding included/covered properties is currently blocked, see #2194 @@ -2038,7 +2038,7 @@ await Test( var table = Assert.Single(model.Tables); var index = Assert.Single(table.Indexes); Assert.Equal(@"(""Name"" IS NOT NULL)", index.Filter); - Assert.Equal(1, index.Columns.Count); + Assert.Single(index.Columns); Assert.Contains(table.Columns.Single(c => c.Name == "Name"), index.Columns); // Scaffolding included/covered properties is currently blocked, see #2194 @@ -2082,7 +2082,7 @@ await Test( var table = Assert.Single(model.Tables); var index = Assert.Single(table.Indexes); Assert.True(index.IsUnique); - Assert.Equal(1, index.Columns.Count); + Assert.Single(index.Columns); Assert.Contains(table.Columns.Single(c => c.Name == "Name"), index.Columns); // Scaffolding included/covered properties is currently blocked, see #2194 @@ -2128,7 +2128,7 @@ await Test( var index = Assert.Single(table.Indexes); Assert.True(index.IsUnique); Assert.Equal(@"(""Name"" IS NOT NULL)", index.Filter); - Assert.Equal(1, index.Columns.Count); + Assert.Single(index.Columns); Assert.Contains(table.Columns.Single(c => c.Name == "Name"), index.Columns); // Scaffolding included/covered properties is currently blocked, see #2194 diff --git a/test/EFCore.PG.FunctionalTests/Scaffolding/NpgsqlDatabaseModelFactoryTest.cs b/test/EFCore.PG.FunctionalTests/Scaffolding/NpgsqlDatabaseModelFactoryTest.cs index b064d2f81..6ed2565f4 100644 --- a/test/EFCore.PG.FunctionalTests/Scaffolding/NpgsqlDatabaseModelFactoryTest.cs +++ b/test/EFCore.PG.FunctionalTests/Scaffolding/NpgsqlDatabaseModelFactoryTest.cs @@ -186,7 +186,7 @@ public void Filter_schemas() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -209,7 +209,7 @@ public void Filter_tables() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -232,7 +232,7 @@ public void Filter_tables_with_qualified_name() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K.2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -256,7 +256,7 @@ public void Filter_tables_with_schema_qualified_name1() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -281,7 +281,7 @@ public void Filter_tables_with_schema_qualified_name2() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K.2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -306,7 +306,7 @@ public void Filter_tables_with_schema_qualified_name3() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K.2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -331,7 +331,7 @@ public void Filter_tables_with_schema_qualified_name4() // ReSharper disable once PossibleNullReferenceException Assert.Equal("K2", table.Name); Assert.Equal(2, table.Columns.Count); - Assert.Equal(1, table.UniqueConstraints.Count); + Assert.Single(table.UniqueConstraints); Assert.Empty(table.ForeignKeys); }, """ @@ -1060,12 +1060,7 @@ CREATE TABLE "SystemColumnsTable" """, Enumerable.Empty(), Enumerable.Empty(), - dbModel => - { - var columns = dbModel.Tables.Single().Columns; - - Assert.Equal(1, columns.Count); - }, + dbModel => Assert.Single(dbModel.Tables.Single().Columns), @"DROP TABLE ""SystemColumnsTable"""); #endregion @@ -2027,11 +2022,8 @@ public void Bug453() """, Enumerable.Empty(), Enumerable.Empty(), - dbModel => - { - // Enum columns are left out of the model for now (a warning is logged). - Assert.Equal(1, dbModel.Tables.Single(t => t.Name == "foo").Columns.Count); - }, + // Enum columns are left out of the model for now (a warning is logged). + dbModel => Assert.Single(dbModel.Tables.Single(t => t.Name == "foo").Columns), """ DROP TABLE bar; DROP TABLE foo;