//using System; //using Microsoft.AspNetCore.Builder; //using Microsoft.AspNetCore.Hosting; //using Microsoft.AspNetCore.Http; //using Microsoft.AspNetCore.Http.Features.Authentication; //using Microsoft.AspNetCore.Identity; //using Microsoft.Extensions.DependencyInjection; //using Microsoft.Extensions.Options; //using Moq; //using Ombi.Api.Emby; //using Ombi.Api.Plex; //using Ombi.Core.Authentication; //using Ombi.Core.Settings; //using Ombi.Core.Settings.Models.External; //using Ombi.Models.Identity; //using Ombi.Store.Context; //using Ombi.Store.Entities; //using Ombi.Store.Repository; //namespace Ombi.Tests //{ // public class TestStartup // { // public IServiceProvider ConfigureServices(IServiceCollection services) // { // var _plexApi = new Mock(); // var _embyApi = new Mock(); // var _tokenSettings = new Mock>(); // var _embySettings = new Mock>(); // var _plexSettings = new Mock>(); // var audit = new Mock(); // var tokenRepo = new Mock(); // services.AddEntityFrameworkInMemoryDatabase() // .AddDbContext(); // services.AddIdentity() // .AddEntityFrameworkStores().AddUserManager(); // services.AddTransient(x => _plexApi.Object); // services.AddTransient(x => _embyApi.Object); // services.AddTransient(x => _tokenSettings.Object); // services.AddTransient(x => _embySettings.Object); // services.AddTransient(x => _plexSettings.Object); // services.AddTransient(x => audit.Object); // services.AddTransient(x => tokenRepo.Object); // // Taken from https://github.com/aspnet/MusicStore/blob/dev/test/MusicStore.Test/ManageControllerTest.cs (and modified) // var context = new DefaultHttpContext(); // context.Features.Set(new HttpAuthenticationFeature()); // services.AddSingleton(h => new HttpContextAccessor { HttpContext = context }); // services.Configure(options => // { // options.Password.RequireDigit = false; // options.Password.RequiredLength = 1; // options.Password.RequireLowercase = false; // options.Password.RequireNonAlphanumeric = false; // options.Password.RequireUppercase = false; // options.User.AllowedUserNameCharacters = string.Empty; // }); // return services.BuildServiceProvider(); // } // public void Configure(IApplicationBuilder app, IHostingEnvironment env) // { // } // } //}