From 70a0a56c02e3a3a8482b5072ee6c68a74ea909e0 Mon Sep 17 00:00:00 2001 From: Mikhail Chatillon Date: Mon, 31 Oct 2022 17:09:34 +0100 Subject: [PATCH] Upgrade All .net versions (#1949) * Upgrade versions * Fix tests --- Directory.Build.props | 17 +++++++++-------- .../LoraKeysManagerFacade.csproj | 6 +++--- .../LoRaWan.NetworkServer.csproj | 2 +- .../LoraTools/LoRaTools.csproj | 2 +- .../ConcentratorFirmwareFunctionTests.cs | 17 +++++++---------- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 327795d55e..081c38a6ce 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,44 +10,45 @@ net6.0 + 12.14.1 3.125.12 1.38.1 1.41.2 6.0.1 1.1.0 - 6.0.0 + 6.0.1 6.0.0 6.0.0 4.1.3 13.0.1 1.9.0 4.3.0 - 2.6.66 + 2.6.70 4.7.0 2.21.0 - 6.0.0 - 1.6.1 + 7.0.0 + 1.7.0 2.2.0 - 3.125.5 + 3.125.12 17.3.2 4.18.2 2.4.2 - 1.4.1 + 1.5.25 6.0.1 6.0.0 6.0.1 6.0.0 6.0.0 2.4.5 - 3.1.2 + 3.2.0 6.0.0 6.0.0 34.0.2 1.3.0 6.0.10 - 5.7.2 + 5.7.3 diff --git a/LoRaEngine/LoraKeysManagerFacade/LoraKeysManagerFacade.csproj b/LoRaEngine/LoraKeysManagerFacade/LoraKeysManagerFacade.csproj index 9bfab5c29d..64da16df4b 100644 --- a/LoRaEngine/LoraKeysManagerFacade/LoraKeysManagerFacade.csproj +++ b/LoRaEngine/LoraKeysManagerFacade/LoraKeysManagerFacade.csproj @@ -1,11 +1,11 @@ - + $(TargetFramework) v4 - - + + diff --git a/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/LoRaWan.NetworkServer.csproj b/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/LoRaWan.NetworkServer.csproj index 62b2620eb7..b9816ff7f5 100644 --- a/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/LoRaWan.NetworkServer.csproj +++ b/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/LoRaWan.NetworkServer.csproj @@ -19,7 +19,7 @@ - + diff --git a/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoraTools/LoRaTools.csproj b/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoraTools/LoRaTools.csproj index a433528e34..bf18fabb30 100644 --- a/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoraTools/LoRaTools.csproj +++ b/LoRaEngine/modules/LoRaWanNetworkSrvModule/LoraTools/LoRaTools.csproj @@ -1,4 +1,4 @@ - + $(TargetFramework) diff --git a/Tests/Unit/LoraKeysManagerFacade/ConcentratorFirmwareFunctionTests.cs b/Tests/Unit/LoraKeysManagerFacade/ConcentratorFirmwareFunctionTests.cs index 4e3f65f709..19b32de2dd 100644 --- a/Tests/Unit/LoraKeysManagerFacade/ConcentratorFirmwareFunctionTests.cs +++ b/Tests/Unit/LoraKeysManagerFacade/ConcentratorFirmwareFunctionTests.cs @@ -69,7 +69,7 @@ public async Task RunFetchConcentratorFirmware_Succeeds() 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 @@ public async Task RunFetchConcentratorFirmware_Succeeds() 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())) + this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny(), It.IsAny())) .Returns(Task.FromResult(Response.FromValue(streamingResult, new Mock().Object))); this.blobClient.Setup(m => m.GetPropertiesAsync(null, It.IsAny())) @@ -109,7 +109,7 @@ public async Task RunFetchConcentratorFirmware_Returns_NotFound_ForMissingTwin() 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 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_ForTw 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(), It.IsAny())) .Returns(Task.FromResult(new IoTHubDeviceTwin(twin))); @@ -171,7 +171,7 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_ForTw 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 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_WhenD 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 @@ public async Task RunFetchConcentratorFirmware_Returns_InternalServerError_WhenD this.registryManager.Setup(m => m.GetTwinAsync(It.IsAny(), It.IsAny())) .Returns(Task.FromResult(new IoTHubDeviceTwin(twin))); - this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny>(), + this.blobClient.Setup(m => m.DownloadStreamingAsync(It.IsAny(), It.IsAny())) .ThrowsAsync(new RequestFailedException("download failed"));