-
Notifications
You must be signed in to change notification settings - Fork 610
Expand file tree
/
Copy pathEF6Tests.cs
More file actions
30 lines (27 loc) · 1.19 KB
/
EF6Tests.cs
File metadata and controls
30 lines (27 loc) · 1.19 KB
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
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Core.Common;
using System.Data.Entity.Infrastructure;
using StackExchange.Profiling.Data;
using StackExchange.Profiling.EntityFramework6;
using Xunit;
namespace StackExchange.Profiling.Tests
{
public class EF6Tests : AspNetTest
{
public EF6Tests(ITestOutputHelper output) : base(output)
{
MiniProfilerEF6.Initialize();
}
[Fact]
public void ServicesCheck()
{
Skip.IfNotWindows();
const string providerKey = "System.Data.SQLite";
Assert.IsType<EFProfiledDbProviderServices>(DbConfiguration.DependencyResolver.GetService(typeof(DbProviderServices), providerKey));
Assert.IsType<ProfiledDbProviderFactory>(DbConfiguration.DependencyResolver.GetService(typeof(DbProviderFactory), providerKey));
Assert.IsType<EFProfiledDbProviderFactoryResolver>(DbConfiguration.DependencyResolver.GetService(typeof(IDbProviderFactoryResolver), providerKey));
Assert.IsType<EFProfiledDbConnectionFactory>(DbConfiguration.DependencyResolver.GetService(typeof(IDbConnectionFactory), providerKey));
}
}
}