mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Merge branch '2.0' into 116-add-loginauth-token-feature-to-net-api
This commit is contained in:
20
src/Core/API/API.Specs/TestApiFactory.cs
Normal file
20
src/Core/API/API.Specs/TestApiFactory.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
|
namespace API.Specs
|
||||||
|
{
|
||||||
|
public class TestApiFactory : WebApplicationFactory<Program>
|
||||||
|
{
|
||||||
|
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
||||||
|
{
|
||||||
|
builder.UseEnvironment("Testing");
|
||||||
|
|
||||||
|
builder.ConfigureAppConfiguration((context, configBuilder) =>
|
||||||
|
{
|
||||||
|
var connectionString = Environment.GetEnvironmentVariable("DB_CONNECTION_STRING");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<Solution>
|
<Solution>
|
||||||
<Folder Name="/API/" >
|
<Folder Name="/API/" >
|
||||||
<Project Path="API/API.Core/API.Core.csproj"/>
|
<Project Path="API/API.Core/API.Core.csproj"/>
|
||||||
|
<Project Path="API/API.Specs/API.Specs.csproj"/>
|
||||||
</Folder>
|
</Folder>
|
||||||
<Folder Name="/Database/">
|
<Folder Name="/Database/">
|
||||||
<Project Path="Database/Database.Core/Database.Core.csproj" />
|
<Project Path="Database/Database.Core/Database.Core.csproj" />
|
||||||
|
|||||||
Reference in New Issue
Block a user