File tree Expand file tree Collapse file tree 6 files changed +10
-12
lines changed
MinimalApiPlayground/Properties Expand file tree Collapse file tree 6 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 13
13
"environmentVariables" : {
14
14
"ASPNETCORE_ENVIRONMENT" : " Development"
15
15
},
16
- "applicationUrl" : " https://localhost:5001 ;http://localhost:5000 " ,
16
+ "applicationUrl" : " https://localhost:5005 ;http://localhost:5004 " ,
17
17
"dotnetRunMessages" : true
18
18
},
19
19
"IIS Express" : {
Original file line number Diff line number Diff line change 5
5
var builder = WebApplication . CreateBuilder ( args ) ;
6
6
7
7
var connectionString = builder . Configuration . GetConnectionString ( "TodoDb" ) ?? "Data Source=todos.db" ;
8
- builder . Services . AddScoped < SqliteConnection > ( _ => new SqliteConnection ( connectionString ) ) ;
8
+ builder . Services . AddScoped ( _ => new SqliteConnection ( connectionString ) ) ;
9
9
builder . Services . AddEndpointsApiExplorer ( ) ;
10
10
builder . Services . AddSwaggerGen ( ) ;
11
11
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
<PackageReference Include =" Microsoft.Data.Sqlite" Version =" 6.0.0-*" />
14
14
</ItemGroup >
15
15
16
+ <ItemGroup >
17
+ <AssemblyAttribute Include =" System.Runtime.CompilerServices.InternalsVisibleToAttribute" >
18
+ <_Parameter1 >Todo.Dapper.Tests</_Parameter1 >
19
+ </AssemblyAttribute >
20
+ </ItemGroup >
16
21
</Project >
Original file line number Diff line number Diff line change 11
11
"Todo.EFCore" : {
12
12
"commandName" : " Project" ,
13
13
"dotnetRunMessages" : true ,
14
- "applicationUrl" : " https://localhost:5001 ;http://localhost:5000 " ,
14
+ "applicationUrl" : " https://localhost:5003 ;http://localhost:5002 " ,
15
15
"environmentVariables" : {
16
16
"ASPNETCORE_ENVIRONMENT" : " Development"
17
17
}
Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ public async Task GetSwaggerUI_Returns_OK()
42
42
Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
43
43
}
44
44
45
- class TodoApplication : WebApplicationFactory < TodoApp >
45
+ class TodoApplication : WebApplicationFactory < Program >
46
46
{
47
47
protected override IHost CreateHost ( IHostBuilder builder )
48
48
{
49
49
// Add mock/test services to the builder here
50
50
builder . ConfigureServices ( services =>
51
51
{
52
- services . AddScoped < SqliteConnection > ( sp =>
52
+ services . AddScoped ( sp =>
53
53
{
54
54
// Replace SQL Lite with test DB
55
55
return new SqliteConnection ( "Data Source=testtodos.db" ) ;
You can’t perform that action at this time.
0 commit comments