diff --git a/test/EFCore.Specification.Tests/DataAnnotationTestBase.cs b/test/EFCore.Specification.Tests/DataAnnotationTestBase.cs index ac936de0d85..8f0bb715494 100644 --- a/test/EFCore.Specification.Tests/DataAnnotationTestBase.cs +++ b/test/EFCore.Specification.Tests/DataAnnotationTestBase.cs @@ -762,7 +762,9 @@ public virtual ModelBuilder Key_specified_on_multiple_properties_can_be_overridd Validate(modelBuilder); - Assert.Equal(2, modelBuilder.Model.FindEntityType(typeof(CompositeKeyAttribute)).GetKeys().Single().Properties.Count); + var entityType = modelBuilder.Model.FindEntityType(typeof(CompositeKeyAttribute)); + Assert.Equal(2, entityType.GetKeys().Single().Properties.Count); + Assert.Equal(2, entityType.GetProperties().Count()); return modelBuilder; }