Пример #1
0
        public PreviousResultsTests()
        {
            var serviceTestsLocator = new ServiceTestsLocator();

            var sqlLiteDatabasePath = Path.GetFullPath(@"..\..\..\..\NPV.Api\npv.db");

            serviceTestsLocator.serviceCollection.AddDbContext <NPVContext>(options =>
                                                                            options.UseSqlite($"Data Source={sqlLiteDatabasePath}"));

            _npvContext = serviceTestsLocator.GetService <INPVContext>(typeof(INPVContext), typeof(NPVContext));
        }
Пример #2
0
 public CalculationController(INPVContext npvContext, ICalculationService calculationService)
 {
     _npvContext         = npvContext;
     _calculationService = calculationService;
 }
Пример #3
0
 public PreviousResultsController(INPVContext npvContext, ICalculationService calculationService)
 {
     _npvContext         = npvContext;
     _calculationService = calculationService;
 }