Skip to content

Commit 160efe4

Browse files
robertmclawsclaude
andcommitted
Fix cross-platform line ending issue in multiplicity tests
The verbatim string literals in these tests contained CRLF from the source file, but on Linux CI the implementation outputs LF via Environment.NewLine. Added .Replace("\r\n", "\n") to expected strings to normalize line endings on both platforms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bc6ea35 commit 160efe4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/Microsoft.Data.Entity.Tests.Design/CodeGeneration/Configuration/NavigationProperty/MultiplicityConfigurationTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void GetMethodChain_returns_chan_when_many_to_many()
3737
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
3838
@".Entity<Entity1>()
3939
.HasMany(e => e.Entity2s)
40-
.WithMany(e => e.Entity1s)");
40+
.WithMany(e => e.Entity1s)".Replace("\r\n", "\n"));
4141
}
4242

4343
[TestMethod]
@@ -62,7 +62,7 @@ public void GetMethodChain_returns_chan_when_many_to_required()
6262
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
6363
@".Entity<Entity1>()
6464
.HasMany(e => e.Entity2s)
65-
.WithRequired(e => e.Entity1)");
65+
.WithRequired(e => e.Entity1)".Replace("\r\n", "\n"));
6666
}
6767

6868
[TestMethod]
@@ -87,7 +87,7 @@ public void GetMethodChain_returns_chan_when_many_to_optional()
8787
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
8888
@".Entity<Entity1>()
8989
.HasMany(e => e.Entity2s)
90-
.WithOptional(e => e.Entity1)");
90+
.WithOptional(e => e.Entity1)".Replace("\r\n", "\n"));
9191
}
9292

9393
[TestMethod]
@@ -112,7 +112,7 @@ public void GetMethodChain_returns_chan_when_required_to_many()
112112
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
113113
@".Entity<Entity1>()
114114
.HasRequired(e => e.Entity2)
115-
.WithMany(e => e.Entity1s)");
115+
.WithMany(e => e.Entity1s)".Replace("\r\n", "\n"));
116116
}
117117

118118
[TestMethod]
@@ -137,7 +137,7 @@ public void GetMethodChain_returns_chan_when_required_to_optional()
137137
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
138138
@".Entity<Entity1>()
139139
.HasRequired(e => e.Entity2)
140-
.WithOptional(e => e.Entity1)");
140+
.WithOptional(e => e.Entity1)".Replace("\r\n", "\n"));
141141
}
142142

143143
[TestMethod]
@@ -162,7 +162,7 @@ public void GetMethodChain_returns_chan_when_optional_to_many()
162162
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
163163
@".Entity<Entity1>()
164164
.HasOptional(e => e.Entity2)
165-
.WithMany(e => e.Entity1s)");
165+
.WithMany(e => e.Entity1s)".Replace("\r\n", "\n"));
166166
}
167167

168168
[TestMethod]
@@ -187,7 +187,7 @@ public void GetMethodChain_returns_chan_when_optional_to_required()
187187
configuration.GetMethodChain(code).Replace("\r\n", "\n").Should().Be(
188188
@".Entity<Entity1>()
189189
.HasOptional(e => e.Entity2)
190-
.WithRequired(e => e.Entity1)");
190+
.WithRequired(e => e.Entity1)".Replace("\r\n", "\n"));
191191
}
192192

193193
private class Entity1

0 commit comments

Comments
 (0)