Skip to content

Commit

Permalink
Fix test string assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Jan 5, 2023
1 parent 36e9a9e commit b16748f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions test/EFCore.Design.Tests/Migrations/ModelSnapshotSqlServerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4074,24 +4074,25 @@ public virtual void Property_maximum_maxLength_is_stored_in_snapshot()
=> Test(
builder => builder.Entity<EntityWithStringProperty>().Property<string>("Name").HasMaxLength(-1),
AddBoilerPlate(
GetHeading()
+ @"
modelBuilder.Entity(""Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+EntityWithStringProperty"", b =>
GetHeading() +
"""
modelBuilder.Entity("Microsoft.EntityFrameworkCore.Migrations.ModelSnapshotSqlServerTest+EntityWithStringProperty", b =>
{
b.Property<int>(""Id"")
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType(""int"");
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>(""Id""));
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>(""Name"")
b.Property<string>("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]
Expand Down

0 comments on commit b16748f

Please sign in to comment.