Skip to content

Commit eaf6b22

Browse files
committed
Remove BULK_OPERATIONS constant
1 parent e77323e commit eaf6b22

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

EntityFramework.Exceptions.Tests/DatabaseTests.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public virtual async Task UniqueColumnViolationThrowsUniqueConstraintException()
4444
}
4545
}
4646

47-
#if BULK_OPERATIONS
4847
[Fact]
4948
public virtual async Task UniqueColumnViolationThrowsUniqueConstraintExceptionThroughExecuteUpdate()
5049
{
@@ -58,7 +57,6 @@ await DemoContext.Products
5857
.Where(p => p.Name == "Bulk Update 1" || p.Name == "Bulk Update 2")
5958
.ExecuteDeleteAsync();
6059
}
61-
#endif
6260

6361
[Fact]
6462
public virtual async Task UniqueColumnViolationSameNamesIndexesInDifferentSchemasSetsCorrectTableName()
@@ -124,7 +122,6 @@ public virtual async Task RequiredColumnViolationThrowsCannotInsertNullException
124122
await Assert.ThrowsAsync<CannotInsertNullException>(() => DemoContext.SaveChangesAsync());
125123
}
126124

127-
#if BULK_OPERATIONS
128125
[Fact]
129126
public virtual async Task RequiredColumnViolationThrowsCannotInsertNullExceptionThroughExecuteUpdate()
130127
{
@@ -135,7 +132,6 @@ public virtual async Task RequiredColumnViolationThrowsCannotInsertNullException
135132
await Assert.ThrowsAsync<CannotInsertNullException>(async () => await DemoContext.Products.ExecuteUpdateAsync(p => p.SetProperty(pp => pp.Name, (string)null)));
136133
await DemoContext.Products.Where(p => p.Name == "Bulk Update 1").ExecuteDeleteAsync();
137134
}
138-
#endif
139135

140136
[Fact]
141137
public virtual async Task MaxLengthViolationThrowsMaxLengthExceededException()
@@ -146,7 +142,6 @@ public virtual async Task MaxLengthViolationThrowsMaxLengthExceededException()
146142
await Assert.ThrowsAsync<MaxLengthExceededException>(() => DemoContext.SaveChangesAsync());
147143
}
148144

149-
#if BULK_OPERATIONS
150145
[Fact]
151146
public virtual async Task MaxLengthViolationThrowsMaxLengthExceededExceptionThroughExecuteUpdate()
152147
{
@@ -178,7 +173,6 @@ await DemoContext.Products
178173
.ExecuteUpdateAsync(p => p.SetProperty(pp => pp.Name, new string('G', DemoContext.ProductNameMaxLength + 5)));
179174
}
180175
}
181-
#endif
182176

183177
[Fact]
184178
public virtual async Task NumericOverflowViolationThrowsNumericOverflowException()
@@ -191,7 +185,6 @@ public virtual async Task NumericOverflowViolationThrowsNumericOverflowException
191185
await Assert.ThrowsAsync<NumericOverflowException>(() => DemoContext.SaveChangesAsync());
192186
}
193187

194-
#if BULK_OPERATIONS
195188
[Fact]
196189
public virtual async Task NumericOverflowViolationThrowsNumericOverflowExceptionThroughExecuteUpdate()
197190
{
@@ -224,7 +217,6 @@ await DemoContext.ProductSales
224217
.ExecuteUpdateAsync(s => s.SetProperty(ss => ss.Price, 3141.59265m));
225218
}
226219
}
227-
#endif
228220

229221
[Fact]
230222
public virtual async Task ReferenceViolationThrowsReferenceConstraintException()
@@ -242,7 +234,6 @@ public virtual async Task ReferenceViolationThrowsReferenceConstraintException()
242234
}
243235
}
244236

245-
#if BULK_OPERATIONS
246237
[Fact]
247238
public virtual async Task ReferenceViolationThrowsReferenceConstraintExceptionThroughExecuteUpdate()
248239
{
@@ -282,7 +273,6 @@ await DemoContext.ProductSales
282273
.ExecuteUpdateAsync(s => s.SetProperty(ss => ss.ProductId, 0));
283274
}
284275
}
285-
#endif
286276

287277
[Fact]
288278
public virtual async Task DatabaseUnrelatedExceptionThrowsOriginalException()
@@ -317,7 +307,6 @@ public virtual async Task DeleteParentItemThrowsReferenceConstraintException()
317307
await Assert.ThrowsAsync<ReferenceConstraintException>(() => DemoContext.SaveChangesAsync());
318308
}
319309

320-
#if BULK_OPERATIONS
321310
[Fact]
322311
public virtual async Task DeleteParentItemThrowsReferenceConstraintExceptionThroughExecuteDelete()
323312
{
@@ -347,7 +336,6 @@ await DemoContext.Products
347336
.ExecuteDeleteAsync();
348337
}
349338
}
350-
#endif
351339

352340
[Fact]
353341
public async Task NotHandledViolationReThrowsOriginalException()

EntityFramework.Exceptions.Tests/OracleTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ public OracleTests(OracleTestContextFixture fixture) : base(fixture.DemoContext)
1212
{
1313
}
1414

15-
#if BULK_OPERATIONS
1615
[Fact(Skip = "Skipping until ORA-01407 is supported")]
1716
public override Task RequiredColumnViolationThrowsCannotInsertNullExceptionThroughExecuteUpdate()
1817
{
1918
return Task.CompletedTask;
2019
}
21-
#endif
2220
}
2321

2422
public class OracleTestContextFixture : DemoContextFixture<OracleContainer>

EntityFramework.Exceptions.Tests/SqliteTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public override Task NumericOverflowViolationThrowsNumericOverflowException()
4141
return Task.CompletedTask;
4242
}
4343

44-
#if BULK_OPERATIONS
4544
[Fact(Skip = "Skipping due to an EF Core bug fixed in EF Core 9")]
4645
public override Task MaxLengthViolationThrowsMaxLengthExceededExceptionThroughExecuteUpdate()
4746
{
@@ -53,7 +52,6 @@ public override Task NumericOverflowViolationThrowsNumericOverflowExceptionThrou
5352
{
5453
return Task.CompletedTask;
5554
}
56-
#endif
5755
}
5856

5957
public class SqliteDemoContextFixture : DemoContextFixture<IContainer>

EntityFramework.Exceptions.Tests/Tests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.21.121" />
4949
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
5050
</ItemGroup>
51-
52-
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
53-
<DefineConstants>BULK_OPERATIONS</DefineConstants>
54-
</PropertyGroup>
5551

5652
<ItemGroup>
5753
<ProjectReference Include="..\EntityFramework.Exceptions.MySQL.Pomelo\MySQL.Pomelo.csproj" />

0 commit comments

Comments
 (0)