Exemplo n.º 1
0
 public static void Tests()
 {
     DiSetup.@base();
     DiManager.GetInstance().AddTypeTranslation("HttpMessageHandlerProxy", typeof(HttpMessageHandler));
     DiManager.GetInstance().AddTypeTranslation("Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler", typeof(HttpMessageHandler));
     DiManager.GetInstance().AddTypeTranslation("RedirectHandler", typeof(HttpMessageHandler));
 }
Exemplo n.º 2
0
 public static void Initialize()
 {
     DiSetup.InitializeInMemoryEndpoints();
 }
Exemplo n.º 3
0
 public static void InMemoryDataServiceTests()
 {
     DiSetup.Tests();
     DiManager.GetInstance().RegisterType <IDataService, NET.efilnukefesin.Implementations.Services.DataService.InMemoryDataService.InMemoryDataService>();  //TODO: switch per test
 }
Exemplo n.º 4
0
 public static void AddToAspNetCore(IServiceCollection services)
 {
     DiManager.GetInstance().RegisterType <IEndpointRegister, NET.efilnukefesin.Implementations.Services.DataService.EndpointRegister.EndpointRegister>(Lifetime.Singleton);  //where is all the data coming from?
     services.AddSingleton <IDataService>(s => DiHelper.GetService <InMemoryDataService>("Data"));
     DiSetup.Initialize();
 }