// This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) { services .Initialize <AppSettings>(Configuration, AppSettings.Global.Identity) .IncludeCors(AppSettings.Global.Web.HttpsUrl, AppSettings.Global.Wallet.HttpsUrl, AppSettings.Global.WalletViews.HttpsUrl, AppSettings.Global.Exchange.HttpsUrl) .IncludeAuthenticationForIdentity() .IncludeSqlServer <ApplicationContext>(AppSettings.Global.Sql, AppSettings.Local.Sql) .IncludeBus(typeof(LoginCommandHandler)) .IncludeIdentityServer(AppSettings.Global.Sql.ConnectionString) .AddMvc() .IncludeFluentValidation(typeof(RegisterCommandValidator)) .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); return(ServicesExtentions.RegisterModules(services, new InfrastractureAutofacModule(), new ConcreteAutofacModule())); }
public void CalcScoreboardPercentTests(int position, int total, float expected) { var actual = ServicesExtentions.CalcScoreboardPercent(position, total); Assert.Equal(expected, actual, precision: 10); }