40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Strata.Configuration.Client.DependencyInjection.ConsoleApps;
|
|
using Strata.ApiLib.Core.StrataAuthentication.Bootstrappers;
|
|
using Strata.Stratasphere.Biz.Configuration;
|
|
using Hangfire;
|
|
using Hangfire.MemoryStorage;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Strata.Stratasphere.Biz.Standards;
|
|
|
|
namespace Strata.Stratasphere.Biz.IntegrationTests
|
|
{
|
|
/// <summary>
|
|
/// Factory class for getting the dependencies in place for testing purposes
|
|
/// </summary>
|
|
public static class ServiceCollectionFactory
|
|
{
|
|
public static IServiceCollection Create()
|
|
{
|
|
var services = new ServiceCollection();
|
|
var configuration = StrataConfigurationFactory.GetConfiguration();
|
|
services.AddSingleton(configuration);
|
|
services.AddStrataAuthentication(configuration);
|
|
services.AddStratasphere(configuration);
|
|
services.AddLogging();
|
|
|
|
services.AddHangfire(c => c.UseMemoryStorage());
|
|
|
|
//ADD any test specific stuff
|
|
services.AddTransient<HACsJob>();
|
|
services.AddTransient<ReadmissionJob>();
|
|
|
|
return services;
|
|
}
|
|
}
|
|
}
|