-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
CommandConfigurationTest.cs
32 lines (24 loc) · 1.1 KB
/
CommandConfigurationTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ReSharper disable InconsistentNaming
namespace Microsoft.EntityFrameworkCore;
#nullable disable
public class CommandConfigurationTest(CommandConfigurationTest.CommandConfigurationTestFixture fixture) : IClassFixture<CommandConfigurationTest.CommandConfigurationTestFixture>
{
protected CommandConfigurationTestFixture Fixture { get; } = fixture;
[ConditionalFact]
public void Constructed_select_query_CommandBuilder_throws_when_negative_CommandTimeout_is_used()
{
using var context = CreateContext();
Assert.Throws<ArgumentException>(() => context.Database.SetCommandTimeout(-5));
}
protected DbContext CreateContext()
=> Fixture.CreateContext();
public class CommandConfigurationTestFixture : SharedStoreFixtureBase<PoolableDbContext>
{
protected override string StoreName
=> "Empty";
protected override ITestStoreFactory TestStoreFactory
=> SqliteTestStoreFactory.Instance;
}
}