Exemple #1
0
        public ListaOficialFilmesServiceTest()
        {
            IServiceCollection services = new ServiceCollection();

            services.AddHttpClient();
            services.AddScoped <IConfrontosService, ConfrontosService>();
            services.AddSingleton <IListaOficialFilmesService, ListaOficialFilmesService>();

            var serviceProvider = services.BuildServiceProvider();

            _listaOficialFilmesService = serviceProvider.GetRequiredService <IListaOficialFilmesService>();
        }
Exemple #2
0
 public ConfrontosService(IListaOficialFilmesService originalListService)
 {
     _originalListService = originalListService;
 }
Exemple #3
0
 public ValidateFilmesSelecionadosFilterImplementation(IListaOficialFilmesService listaOficialService)
 {
     _listaOficialService = listaOficialService;
 }
Exemple #4
0
 public ConfrontosController(IServiceProvider serviceProvider)
 {
     _originalListService   = serviceProvider.GetRequiredService <IListaOficialFilmesService>();
     _lazyConfrontoBusiness = new Lazy <IConfrontosService>(() => serviceProvider.GetRequiredService <IConfrontosService>());
 }