From b16748fee3b9d6aaeddd061365c83d81ccc48488 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Thu, 5 Jan 2023 11:26:02 +0100 Subject: [PATCH] Fix test string assertion --- .../Migrations/ModelSnapshotSqlServerTest.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs index c0cef86bde6..cca686448c9 100644 --- a/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs +++ b/test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs @@ -4074,24 +4074,25 @@ public virtual void Property_maximum_maxLength_is_stored_in_snapshot() => Test( builder => builder.Entity().Property("Name").HasMaxLength(-1), AddBoilerPlate( - GetHeading() - + @" - modelBuilder.Entity(""Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+EntityWithStringProperty"", b => + GetHeading() + +""" + modelBuilder.Entity("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+EntityWithStringProperty", b => { - b.Property(""Id"") + b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType(""int""); + .HasColumnType("int"); - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property(""Id"")); + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - b.Property(""Name"") + b.Property("Name") .HasMaxLength(-1) - .HasColumnType(""nvarchar(max)""); + .HasColumnType("nvarchar(max)"); - b.HasKey(""Id""); + b.HasKey("Id"); - b.ToTable(""EntityWithStringProperty""); - });"), + b.ToTable("EntityWithStringProperty"); + }); +"""), o => Assert.Equal(-1, o.GetEntityTypes().First().FindProperty("Name").GetMaxLength())); [ConditionalFact]