mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
Create common test infrastructure project
This commit is contained in:
19
test/Common/Helpers/Factories.cs
Normal file
19
test/Common/Helpers/Factories.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Repositories.EntityFramework;
|
||||
using Bit.Core.Settings;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Bit.Test.Common.Helpers.Factories
|
||||
{
|
||||
public static class GlobalSettingsFactory
|
||||
{
|
||||
public static GlobalSettings GlobalSettings { get; } = new GlobalSettings();
|
||||
static GlobalSettingsFactory()
|
||||
{
|
||||
var configBuilder = new ConfigurationBuilder().AddUserSecrets<Bit.Api.Startup>();
|
||||
var Configuration = configBuilder.Build();
|
||||
ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), GlobalSettings);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user