public virtual async void TestUpdate() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); var mapper = new ApiRateServerModelMapper(); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; IRateService service = testServer.Host.Services.GetService(typeof(IRateService)) as IRateService; ApiRateServerResponseModel model = await service.Get(1); ApiRateClientRequestModel request = mapper.MapServerResponseToClientRequest(model); request.SetProperties(2m, 1, 1); UpdateResponse <ApiRateClientResponseModel> updateResponse = await client.RateUpdateAsync(model.Id, request); context.Entry(context.Set <Rate>().ToList()[0]).Reload(); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); updateResponse.Record.Id.Should().Be(1); context.Set <Rate>().ToList()[0].AmountPerMinute.Should().Be(2m); context.Set <Rate>().ToList()[0].TeacherId.Should().Be(1); context.Set <Rate>().ToList()[0].TeacherSkillId.Should().Be(1); updateResponse.Record.Id.Should().Be(1); updateResponse.Record.AmountPerMinute.Should().Be(2m); updateResponse.Record.TeacherId.Should().Be(1); updateResponse.Record.TeacherSkillId.Should().Be(1); }
public RateController(IRateService rateService, Core.IWorkContext workContext, IHostingEnvironment env) { this._rateService = rateService; this._workContext = workContext; this._env = env; }
public MoneyService( WalletContext walletContext, IRateService rateService) { _walletContext = walletContext; _rateService = rateService; }
public HomeController(IBookService bookService, IAuthorService authorService, UserManager <IdentityUser> userManager, IRateService rateService) { _bookService = bookService; _authorService = authorService; _userManager = userManager; _rateService = rateService; }
public DepartureService(IRepository <DepartureEntity> departureRepository, IRepository <EntryEntity> entryRepository, IRateService rateService, ICellService cellService) { _departureRepository = departureRepository; _entryRepository = entryRepository; _rateService = rateService; _cellService = cellService; }
public HomeController(IBookService bookService, IAuthorService authorService, IRateService rateService, IWishListService wlService) { _bookService = bookService; _authorService = authorService; _rateService = rateService; _wlService = wlService; }
public HomeController(IBookService bookService, IAuthorService authorService, IRateService rateService, ILibraryHttpDataClient client) { _bookService = bookService; _authorService = authorService; _rateService = rateService; _client = client; }
public RateController() { this._rateService = new RateService(); this._rateTypeService = new RateTypeService(); this._accountService = new AccountService(); this._placeService = new PlaceService(); }
public ManageLibraryController(IBookService bookService, IAuthorService authorService, IRateService rateService, ICommentService commentService) { _bookService = bookService; _authorService = authorService; _commentService = commentService; _rateService = rateService; }
public HomeController(ILogger <HomeController> logger, IRateService rateService, ITaxReport report, IOptions <SampleSettings> settingsOptions, IEmailSender emailSender) { sampleSettings = settingsOptions.Value; _logger = logger; this.rateService = rateService; //emailSender.SendEmailAsync("*****@*****.**","dasdasdas", "tjenare<br />hopp").Wait(); }
public void SetUp() { //Default hits production API URL //_rateService = new RateService(); //Uses test API URL by default. Configure in app.config. _rateService = new RateService(Settings.Default.UspsApiUrl, new PostRequest()); _userId = Settings.Default.UspsUserId; _password = Settings.Default.UspsPassword; _sourceZipCode = Settings.Default.UspsSourceZip; if (string.IsNullOrEmpty(_userId)) { throw new Exception("You must set UspsUserId in app.config to run 'Explicit' integration tests"); } if (string.IsNullOrEmpty(_password)) { throw new Exception("You must set UspsPassword in app.config to run 'Explicit' integration tests"); } if (string.IsNullOrEmpty(_sourceZipCode)) { throw new Exception("You must set UspsSourceZip in app.config to run 'Explicit' integration tests"); } }
public RateController(ILogger <SegmentController> logger, IConfiguration configuration, ISegmentService segmentService, IRateService rateService) { _logger = logger; _configuration = configuration; _segmentService = segmentService; _rateService = rateService; }
public RateServer(IHubContext <RateServerHub> hub, IRateService rateService) { Hub = hub; _rateService = rateService; ((RateRepository)_rateService).setTokenPairSubject(_tokenPairRateSubject); }
public RateController(IRateService rateService, IPostService postService, IUserService userService, IMapper mapper) { _rateService = rateService; _postService = postService; _userService = userService; _mapper = mapper; }
public OperationsController(IRepository <Transaction> TransactionsRepository, ITransactionService TransactionService, IRepository <Rate> RatesRepository, IRateService RateService) { this.transactionRep = TransactionsRepository; this.rateRep = RatesRepository; this.transactionsvc = TransactionService; this.ratesvc = RateService; }
public ClientController( IClientService clientService, IRateService rateService) { this.clientService = clientService; this.rateService = rateService; }
public ProductController(IProductSevice productService, IProductDetailService productDetailService, IProductSizeService productSizeService, IProductImageService productImageService, IColorService colorService, IRateService rateService, IReviewService reviewService, IUserService userService, IOrderService orderService, IOrderDetailService orderDetailService, ICategoryService categoryService, IMapper mapper) { _productService = productService; _categoryService = categoryService; _productDetailService = productDetailService; _productSizeService = productSizeService; _productImageService = productImageService; _colorService = colorService; _rateService = rateService; _reviewService = reviewService; _userService = userService; _orderService = orderService; _orderDetailService = orderDetailService; _mapper = mapper; }
public virtual async void TestDelete() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; IRateService service = testServer.Host.Services.GetService(typeof(IRateService)) as IRateService; var model = new ApiRateServerRequestModel(); model.SetProperties(2m, 1, 1); CreateResponse <ApiRateServerResponseModel> createdResponse = await service.Create(model); createdResponse.Success.Should().BeTrue(); ActionResponse deleteResult = await client.RateDeleteAsync(2); deleteResult.Success.Should().BeTrue(); ApiRateServerResponseModel verifyResponse = await service.Get(2); verifyResponse.Should().BeNull(); }
public ShippingSeeSharpShipUspsController(SeeSharpShipUspsSettings uspsSettings, ISettingService settingService) { _uspsSettings = uspsSettings; _settingService = settingService; // ReSharper disable once CSharpWarnings::CS0618 _rateService = _uspsSettings.Url == null ? new RateService() : new RateService(_uspsSettings.Url, new PostRequest()); }
public RatesController(IRateService rateService, IOptions <EndpointSettings> endpointSettings, ILogger <IRateService> logger) { _endpointSettings = endpointSettings; _rateService = rateService; _logger = logger; }
public ManageLibraryController(IBookService bookService, IAuthorService authorService, IRateService rateService, ICommentService commentService, ILibraryHttpDataClient client) { _bookService = bookService; _authorService = authorService; _commentService = commentService; _client = client; _rateService = rateService; }
public RateServiceTests() { this.service = new RateService(); service.Add(new Rate { RateInformation = "5", } ); service.Add(new Rate { RateInformation = "3" } ); }
public void SetUp() { data = DataCollection.Rates; var repo = MockRepository <Rate> .Initialize(data); rateService = new RateService(repo); }
public TrustManagementService(ApplicationDbContext context, IIpfsService ipfsService, ISmartContractService smartContractService, IStatisticService statisticService, IRateService rateService, ILogger <ITrustManagementService> logger) { this.context = context; this.ipfsService = ipfsService; this.smartContractService = smartContractService; this.statisticService = statisticService; this.rateService = rateService; this.logger = logger; }
public CalculationService(IRateService rateService, IDiscountDocumentService discountDocumentService, IAccountService accountService, IStreetService streetService, ISearchService searchService) { _rateService = rateService; _discountDocumentService = discountDocumentService; _accountService = accountService; _streetService = streetService; _searchService = searchService; }
public RateUpdatedNotificationHandler( ILogger <RateUpdatedEvent> logger, IRateService rateService, IServiceBusClient serviceBusClient) : base(logger) { _rateService = rateService; _serviceBusClient = serviceBusClient; }
public PlaceModel(ITuristPlaceService turistPlaceService, ICommentService commentService, UserManager <User> userManager) { this.turistPlaceService = turistPlaceService; this.commentService = commentService; this.rateService = rateService; this.userManager = userManager; }
public SollecitiService(IRateService rateService, IVersamentiCondominiService versamentiService, IMovimentiContabiliService movimentiContabileService, IPersonaService personaService, IProtocolloService protocolloService, IEsercizioService esercizioService, IDaoFactory daofactory) { _rateService = rateService; _versamentiService = versamentiService; _movimentiContabileService = movimentiContabileService; _personaService = personaService; _protocolloService = protocolloService; _esercizioService = esercizioService; _daoFactory = daofactory; }
public VideoService( IDeletableEntityRepository <Video> videoRepository, ICommentSerivce commentSerivce, IRateService rateService ) { this.videoRepository = videoRepository; this.commentSerivce = commentSerivce; this.rateService = rateService; }
public UpdateRateCommonHandler( IValidator <UpdateRateCommand> validator, ILogger <UpdateRateCommand> logger, IMapper mapper, IRateService rateService) : base(validator, logger) { _mapper = mapper; _rateService = rateService; }
public TransactionService( IRepository <Transaction> TransactionRepository, IResourceClient <Transaction> TransactionClient, IRateService RateService, LogFactory Factory) { this._TransactionRepository = TransactionRepository; this._TransactionClient = TransactionClient; this._RateService = RateService; this._Logger = Factory.GetCurrentClassLogger(); }
public HomeController(IProductService productService, IReportService reportService, IRateService rateService, ICommentService commentService, IShopPropositionService shopPropositionService, IProductPropositionService productPropositionService, IShopService shopService) { _productService = productService; _reportService = reportService; _rateService = rateService; _commentService = commentService; _shopPropositionService = shopPropositionService; _productPropositionService = productPropositionService; _shopService = shopService; }
public SubentroService(IBilancioService bilancioService, IRateService rateService, IPersonaService personaService, ISoggettoService soggettoService, IRipartizioneSpeseService ripartizioneSpeseService, ISaldoContabileService saldoContabileService, IVersamentiCondominiService versamentiCondominiService, IPianoContiService pianoContiService, ISaldiCondominiService saldiCondominiService, IPersistenceContext persistenceContext, IDaoFactory daofactory) { _bilancioService = bilancioService; _daoFactory = daofactory; _rateService = rateService; _personaService = personaService; _soggettoService = soggettoService; _ripartizioneSpeseService = ripartizioneSpeseService; _saldoContabileService = saldoContabileService; _versamentiCondominiService = versamentiCondominiService; _pianoContiService = pianoContiService; _saldiCondominiService = saldiCondominiService; _persistenceContext = persistenceContext; }
/// <summary> /// Counstruts example of <see cref="ExchangeRates"/> /// </summary> /// <param name="sessionFactory">Factory of datasource-sessions</param> /// <param name="rateRepository">Repository of cached rates</param> /// <param name="rateService">Rate remote service</param> /// <exception cref="ArgumentNullException"/> public ExchangeRates(ISessionFactory sessionFactory, IRateRepository rateRepository, IRateService rateService) { if (sessionFactory == null) throw new ArgumentNullException("sessionFactory"); if (rateRepository == null) throw new ArgumentNullException("rateRepository"); if (rateService == null) throw new ArgumentNullException("rateService"); ErrorMessage = string.Empty; _sessionFactory = sessionFactory; _rateRepository = rateRepository; _rateService = rateService; }
private readonly TimeSpan _updatedPeriod = new TimeSpan(0, 0, 30, 0); // 30 minutes #endregion Fields #region Constructors public CurrencyService(IRateService rateService) { _rateService = rateService; }
public RoomTypeService(IRateService rateService) { RateService = rateService; RoomTypeRepo = new Repository<RoomType>(); }
public RateCommand(ILogger logger, IRateService rateService) { this.logger = logger; this.rateService = rateService; }