Add mocked broker client
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
@using Hcs.Broker.MessageCapturer
|
||||
@using Hcs.Service.Async.Nsi
|
||||
@using Hcs.WebApp.Config
|
||||
@using Hcs.WebApp.Services
|
||||
@using Hcs.WebApp.Utils
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@ -14,6 +15,7 @@
|
||||
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IConfiguration Configuration
|
||||
@inject IClientProvider ClientProvider
|
||||
|
||||
<PageTitle>Тестирование экспорта</PageTitle>
|
||||
|
||||
@ -59,7 +61,7 @@
|
||||
string messageBody;
|
||||
string responseBody;
|
||||
|
||||
Client client;
|
||||
IClient client;
|
||||
ActionLogger logger = new ActionLogger();
|
||||
FileMessageCapturer messageCapturer;
|
||||
bool catchMessageBody;
|
||||
@ -73,19 +75,8 @@
|
||||
messageCapturer = new FileMessageCapturer("test/export", logger);
|
||||
messageCapturer.OnFileWritten += OnFileWritten;
|
||||
|
||||
var brokerConfig = Configuration.GetSection("BrokerConfig").Get<BrokerConfig>();
|
||||
client = new Client
|
||||
{
|
||||
OrgPPAGUID = brokerConfig.OrgPPAGUID,
|
||||
ExecutorGUID = brokerConfig.ExecutorGUID,
|
||||
UseTunnel = false,
|
||||
IsPPAK = false,
|
||||
Role = OrganizationRole.RSO,
|
||||
Logger = logger,
|
||||
MessageCapturer = messageCapturer
|
||||
};
|
||||
|
||||
client.SetSigningCertificate(brokerConfig.CertificateSerialNumber);
|
||||
var config = Configuration.GetSection("BrokerConfig").Get<BrokerConfig>();
|
||||
client = ClientProvider.CreateClient(config, logger, messageCapturer);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user