/// <summary> /// Context injection (for sharing data between classes) /// </summary> /// <param name="context">Passed context</param> public MasterAPISteps(Context context) { _context = context; _complianceAssistCallbackClient = new ComplianceAssistClient(TestConfiguration.Current.XORkey, TestConfiguration.Current.NginxUrl); _npCardService = DiUtils.GetContainer().GetInstance <NPCardService>(); _masterApiClient = new MasterApiClient(TestConfiguration.Current.MasterUrl); _masterApiClient.Authorize(TestConfiguration.Current.MasterUser, TestConfiguration.Current.MasterPassword); _dbInstance = new DataBaseSteps(_context); }
public void ThenSendEventsToEpacash(Guid UserId) { DiUtils.GetContainer().GetInstance <IMessageSender <MoneyTransferMessage> >() .Send(new MoneyTransferMessage { Type = "Finance/Internal Payment", UserId = UserId, Date = DateTime.UtcNow, Status = "Confirmed".ToEnum <EventStatus>(), ServiceName = "WaveCrest", InvoiceId = new DataBaseSteps(_context).GetLastInvoiceByUserId(UserId).InvoiceId, Amount = (decimal)1000.00, Fee = 100, FixFee = 100, MinProfit = 0, MaxProfit = 0, PercentFee = 0, Currency = 643 }); }
public static void AfterTestRun() { DiUtils.GetContainer().Dispose(); // TestRun.CloseRun(); }