Родитель
8639ddc160
Коммит
70a0a56c02
|
@ -10,44 +10,45 @@
|
|||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AzureStorageBlobVersion>12.14.1</AzureStorageBlobVersion>
|
||||
<DockerDotNetX509Version>3.125.12</DockerDotNetX509Version>
|
||||
<MicrosoftAzureDevicesVersion>1.38.1</MicrosoftAzureDevicesVersion>
|
||||
<MicrosoftAzureDevicesClientVersion>1.41.2</MicrosoftAzureDevicesClientVersion>
|
||||
<MicrosoftExtensionsCachingMemoryVersion>6.0.1</MicrosoftExtensionsCachingMemoryVersion>
|
||||
<MicrosoftAzureFunctionsExtensionsVersion>1.1.0</MicrosoftAzureFunctionsExtensionsVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionVersion>6.0.0</MicrosoftExtensionsDependencyInjectionVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionVersion>6.0.1</MicrosoftExtensionsDependencyInjectionVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
|
||||
<MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion>
|
||||
<MicrosoftNETSdkFunctionsVersion>4.1.3</MicrosoftNETSdkFunctionsVersion>
|
||||
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
|
||||
<PortableBouncyCastleVersion>1.9.0</PortableBouncyCastleVersion>
|
||||
<SystemDynamicRuntimeVersion>4.3.0</SystemDynamicRuntimeVersion>
|
||||
<StackExchangeRedisVersion>2.6.66</StackExchangeRedisVersion>
|
||||
<StackExchangeRedisVersion>2.6.70</StackExchangeRedisVersion>
|
||||
<MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>
|
||||
<ApplicationInsightsVersion>2.21.0</ApplicationInsightsVersion>
|
||||
<PrometheusNetVersion>6.0.0</PrometheusNetVersion>
|
||||
<AzureIdentityVersion>1.6.1</AzureIdentityVersion>
|
||||
<PrometheusNetVersion>7.0.0</PrometheusNetVersion>
|
||||
<AzureIdentityVersion>1.7.0</AzureIdentityVersion>
|
||||
<MicrosoftAspNetCoreHttpAbstractionsVersion>2.2.0</MicrosoftAspNetCoreHttpAbstractionsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup> <!-- this group is meant for packages required from test projects -->
|
||||
<DockerDotnetVersion>3.125.5</DockerDotnetVersion>
|
||||
<DockerDotnetVersion>3.125.12</DockerDotnetVersion>
|
||||
<MicrosoftNETTestSdkVersion>17.3.2</MicrosoftNETTestSdkVersion>
|
||||
<MoqVersion>4.18.2</MoqVersion>
|
||||
<XUnitVersion>2.4.2</XUnitVersion>
|
||||
<XunitCombinatorialVersion>1.4.1</XunitCombinatorialVersion>
|
||||
<XunitCombinatorialVersion>1.5.25</XunitCombinatorialVersion>
|
||||
<MicrosoftExtensionsConfigurationVersion>6.0.1</MicrosoftExtensionsConfigurationVersion>
|
||||
<MicrosoftExtensionsConfigurationBinderVersion>6.0.0</MicrosoftExtensionsConfigurationBinderVersion>
|
||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.1</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
|
||||
<MicrosoftExtensionsConfigurationJsonVersion>6.0.0</MicrosoftExtensionsConfigurationJsonVersion>
|
||||
<SystemIOPortsVersion>6.0.0</SystemIOPortsVersion>
|
||||
<XUnitRunnerVisualStudio>2.4.5</XUnitRunnerVisualStudio>
|
||||
<CoverletMSBuild>3.1.2</CoverletMSBuild>
|
||||
<CoverletMSBuild>3.2.0</CoverletMSBuild>
|
||||
<MicrosoftExtensionsLogging>6.0.0</MicrosoftExtensionsLogging>
|
||||
<MicrosoftExtensionsLoggingConfiguration>6.0.0</MicrosoftExtensionsLoggingConfiguration>
|
||||
<BogusVersion>34.0.2</BogusVersion>
|
||||
<NullablePkg>1.3.0</NullablePkg>
|
||||
<MicrosoftAspNetCoreMvcTestingVersion>6.0.10</MicrosoftAspNetCoreMvcTestingVersion>
|
||||
<AzureMessagingEventHubsVersion>5.7.2</AzureMessagingEventHubsVersion>
|
||||
<AzureMessagingEventHubsVersion>5.7.3</AzureMessagingEventHubsVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Azure.Storage.Blobs" Version="12.13.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.5.0" />
|
||||
<PackageReference Include="Azure.Storage.Blobs" Version="$(AzureStorageBlobVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.6.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="$(MicrosoftAzureFunctionsExtensionsVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionVersion)" />
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="$(ApplicationInsightsVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.10" />
|
||||
<PackageReference Include="Polly" Version="7.2.3" />
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Version="$(PrometheusNetVersion)" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="$(StackExchangeRedisVersion)" />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);
|
||||
|
||||
var twin = new Twin();
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
|
||||
'package': '1.0.1',
|
||||
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
|
||||
'fwKeyChecksum': 123456,
|
||||
|
@ -81,7 +81,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
var blobBytes = Encoding.UTF8.GetBytes(BlobContent);
|
||||
using var blobContentStream = new MemoryStream(blobBytes);
|
||||
using var streamingResult = BlobsModelFactory.BlobDownloadStreamingResult(blobContentStream);
|
||||
this.blobClient.Setup(m => m.DownloadStreamingAsync(default, null, false, null, It.IsAny<CancellationToken>()))
|
||||
this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<BlobDownloadOptions>(), It.IsAny<CancellationToken>()))
|
||||
.Returns(Task.FromResult(Response.FromValue(streamingResult, new Mock<Response>().Object)));
|
||||
|
||||
this.blobClient.Setup(m => m.GetPropertiesAsync(null, It.IsAny<CancellationToken>()))
|
||||
|
@ -109,7 +109,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);
|
||||
|
||||
var twin = new Twin();
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
|
||||
'package': '1.0.1',
|
||||
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
|
||||
'fwKeyChecksum': 123456,
|
||||
|
@ -149,7 +149,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);
|
||||
|
||||
var twin = new Twin();
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'a': 'b'}"));
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'a': 'b'}"));
|
||||
this.registryManager.Setup(m => m.GetTwinAsync(It.IsAny<string>(), It.IsAny<CancellationToken>()))
|
||||
.Returns(Task.FromResult<IDeviceTwin>(new IoTHubDeviceTwin(twin)));
|
||||
|
||||
|
@ -171,7 +171,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);
|
||||
|
||||
var twin = new Twin();
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
|
||||
'package': '1.0.1',
|
||||
'fwKeyChecksum': 123456,
|
||||
'fwSignature': '123'
|
||||
|
@ -197,7 +197,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
httpRequest.SetupGet(x => x.Query).Returns(queryCollection);
|
||||
|
||||
var twin = new Twin();
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(@"{'cups': {
|
||||
twin.Properties.Desired = new TwinCollection(JsonUtil.Strictify(/*lang=json*/ @"{'cups': {
|
||||
'package': '1.0.1',
|
||||
'fwUrl': 'https://storage.blob.core.windows.net/container/blob',
|
||||
'fwKeyChecksum': 123456,
|
||||
|
@ -206,10 +206,7 @@ namespace LoRaWan.Tests.Unit.LoraKeysManagerFacade
|
|||
this.registryManager.Setup(m => m.GetTwinAsync(It.IsAny<string>(), It.IsAny<CancellationToken>()))
|
||||
.Returns(Task.FromResult<IDeviceTwin>(new IoTHubDeviceTwin(twin)));
|
||||
|
||||
this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<HttpRange>(),
|
||||
It.IsAny<BlobRequestConditions>(),
|
||||
It.IsAny<bool>(),
|
||||
It.IsAny<IProgress<long>>(),
|
||||
this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny<BlobDownloadOptions>(),
|
||||
It.IsAny<CancellationToken>()))
|
||||
.ThrowsAsync(new RequestFailedException("download failed"));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче