Add mocked broker client
This commit is contained in:
42
Hcs.Broker.Mock/Api/MockBillsApi.cs
Normal file
42
Hcs.Broker.Mock/Api/MockBillsApi.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Broker.Api.Payload.Bills;
|
||||
using Hcs.Service.Async.Bills;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="IBillsApi"/>
|
||||
public class MockBillsApi : IBillsApi
|
||||
{
|
||||
/// <inheritdoc cref="IBillsApi"/>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByAccountNumberAsync(short year, int month, string fiasHouseGuid, string accountNumber, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBillsApi"/>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByPaymentDocumentIDAsync(string paymentDocumentID, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBillsApi"/>
|
||||
public async Task<IEnumerable<exportPaymentDocumentResultType>> ExportPaymentDocumentDataByPaymentDocumentNumberAsync(short year, int month, string fiasHouseGuid, string paymentDocumentNumber, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBillsApi"/>
|
||||
public async Task<bool> ImportPaymentDocumentDataAsync(ImportPaymentDocumentDataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Hcs.Broker.Mock/Api/MockDeviceMeteringApi.cs
Normal file
26
Hcs.Broker.Mock/Api/MockDeviceMeteringApi.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Broker.Api.Payload.DeviceMetering;
|
||||
using Hcs.Service.Async.DeviceMetering;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="IDeviceMeteringApi"/>
|
||||
public class MockDeviceMeteringApi : IDeviceMeteringApi
|
||||
{
|
||||
/// <inheritdoc cref="IDeviceMeteringApi"/>
|
||||
public async Task<IEnumerable<exportMeteringDeviceHistoryResultType>> ExportMeteringDeviceHistoryAsync(ExportMeteringDeviceHistoryPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IDeviceMeteringApi"/>
|
||||
public async Task<bool> ImportMeteringDeviceValuesAsync(importMeteringDeviceValuesRequestMeteringDevicesValues values, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
114
Hcs.Broker.Mock/Api/MockHouseManagementApi.cs
Normal file
114
Hcs.Broker.Mock/Api/MockHouseManagementApi.cs
Normal file
@ -0,0 +1,114 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Broker.Api.Payload.HouseManagement;
|
||||
using Hcs.Service.Async.HouseManagement;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public class MockHouseManagementApi : IHouseManagementApi
|
||||
{
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<IEnumerable<exportAccountResultType>> ExportAccountAsync(string fiasHouseGuid, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<IEnumerable<exportHouseResultType>> ExportHouseAsync(string fiasHouseGuid, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<IEnumerable<exportSupplyResourceContractResultType>> ExportSupplyResourceContractDataAsync(CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<exportSupplyResourceContractResultType> ExportSupplyResourceContractDataAsync(Guid contractRootGuid, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<exportSupplyResourceContractResultType> ExportSupplyResourceContractDataAsync(string contractNumber, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<IEnumerable<exportSupplyResourceContractObjectAddressResultType>> ExportSupplyResourceContractObjectAddressDataAsync(Guid contractRootGuid, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<bool> ImportAccountDataAsync(ImportAccountDataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<importContractResultType> ImportContractDataAsync(ImportContractDataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<bool> ImportHouseUODataAsync(ImportLivingHouseUODataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<bool> ImportMeteringDeviceDataAsync(MeteringDeviceFullInformationType meteringDevice, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<bool> ImportNotificationDataAsync(ImportNotificationDataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<getStateResultImportResultCommonResultImportSupplyResourceContract> ImportSupplyResourceContractDataAsync(ImportSupplyResourceContractDataPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IHouseManagementApi"/>
|
||||
public async Task<getStateResultImportResultCommonResultImportSupplyResourceContractProject> ImportSupplyResourceContractProjectAsync(ImportSupplyResourceContractProjectPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Hcs.Broker.Mock/Api/MockNsiApi.cs
Normal file
17
Hcs.Broker.Mock/Api/MockNsiApi.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Service.Async.Nsi;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="INsiApi"/>
|
||||
public class MockNsiApi : INsiApi
|
||||
{
|
||||
/// <inheritdoc cref="INsiApi"/>
|
||||
public async Task<IEnumerable<NsiItemType>> ExportDataProviderNsiItemAsync(exportDataProviderNsiItemRequestRegistryNumber registryNumber, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Hcs.Broker.Mock/Api/MockNsiCommonApi.cs
Normal file
25
Hcs.Broker.Mock/Api/MockNsiCommonApi.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Service.Async.NsiCommon;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="INsiCommonApi"/>
|
||||
public class MockNsiCommonApi : INsiCommonApi
|
||||
{
|
||||
/// <inheritdoc cref="INsiCommonApi"/>
|
||||
public async Task<NsiItemType> ExportNsiItemAsync(int registryNumber, ListGroup listGroup, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="INsiCommonApi"/>
|
||||
public async Task<NsiListType> ExportNsiListAsync(ListGroup listGroup, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Hcs.Broker.Mock/Api/MockOrgRegistryCommonApi.cs
Normal file
25
Hcs.Broker.Mock/Api/MockOrgRegistryCommonApi.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Service.Async.OrgRegistryCommon;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="IOrgRegistryCommonApi"/>
|
||||
public class MockOrgRegistryCommonApi : IOrgRegistryCommonApi
|
||||
{
|
||||
/// <inheritdoc cref="IOrgRegistryCommonApi"/>
|
||||
public async Task<IEnumerable<exportDataProviderResultType>> ExportDataProviderAsync(bool isActual, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IOrgRegistryCommonApi"/>
|
||||
public async Task<IEnumerable<exportOrgRegistryResultType>> ExportOrgRegistryAsync(string ogrn, string kpp, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Hcs.Broker.Mock/Api/MockPaymentsApi.cs
Normal file
25
Hcs.Broker.Mock/Api/MockPaymentsApi.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using Hcs.Broker.Api;
|
||||
using Hcs.Broker.Api.Payload.Payments;
|
||||
|
||||
namespace Hcs.Broker.Mock.Api
|
||||
{
|
||||
/// <inheritdoc cref="IPaymentsApi"/>
|
||||
public class MockPaymentsApi : IPaymentsApi
|
||||
{
|
||||
/// <inheritdoc cref="IPaymentsApi"/>
|
||||
public async Task<bool> ImportNotificationsOfOrderExecutionAsync(ImportNotificationsOfOrderExecutionPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IPaymentsApi"/>
|
||||
public async Task<bool> ImportSupplierNotificationsOfOrderExecutionAsync(ImportSupplierNotificationsOfOrderExecutionPayload payload, CancellationToken token = default)
|
||||
{
|
||||
await Task.Delay(3000, token);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user