Skip to content

Commit

Permalink
Update lora device model properties and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand committed Mar 12, 2022
1 parent 3f0d156 commit f1a5329
Show file tree
Hide file tree
Showing 125 changed files with 488 additions and 446 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Controllers.V10.LoRaWAN;
using AzureIoTHub.Portal.Server.Factories;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Controllers.V10;
using AzureIoTHub.Portal.Server.Entities;
using AzureIoTHub.Portal.Server.Factories;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.v10;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices.Provisioning.Service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using System.Threading.Tasks;
using AzureIoTHub.Portal.Server.Controllers.V10;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) CGI France. All rights reserved.
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
Expand All @@ -15,9 +15,9 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Shared;
Expand Down Expand Up @@ -79,13 +79,13 @@ public async Task GetListStateUnderTestExpectedBehavior()
Tags = twinCollection
}));

_ = this.mockDeviceTwinMapper.Setup(c => c.CreateDeviceListItem(It.IsAny<Twin>(),It.IsAny<IEnumerable<string>>()))
.Returns<Twin,IEnumerable<string>>((x,y) => new DeviceListItem
_ = this.mockDeviceTwinMapper.Setup(c => c.CreateDeviceListItem(It.IsAny<Twin>(), It.IsAny<IEnumerable<string>>()))
.Returns<Twin, IEnumerable<string>>((x, y) => new DeviceListItem
{
DeviceID = x.DeviceId
});

this.mockDeviceTagService.Setup(c => c.GetAllSearchableTagsNames())
_ = this.mockDeviceTagService.Setup(c => c.GetAllSearchableTagsNames())
.Returns(new List<string>());

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Controllers.V10;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.v10;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Common.Exceptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10.LoRaWAN
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.Concentrator;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.Concentrator;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Shared;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using AzureIoTHub.Portal.Server.Controllers.V10;
using AzureIoTHub.Portal.Server.Entities;
using AzureIoTHub.Portal.Server.Factories;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.v10;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10.LoRaWAN
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDevice;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDevice;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Shared;
Expand Down Expand Up @@ -233,12 +233,12 @@ public async Task GetListStateUnderTestExpectedBehavior()
}));

_ = this.mockDeviceTwinMapper.Setup(c => c.CreateDeviceListItem(It.IsAny<Twin>(), It.IsAny<IEnumerable<string>>()))
.Returns<Twin,IEnumerable<string>>((x,y) => new DeviceListItem
.Returns<Twin, IEnumerable<string>>((x, y) => new DeviceListItem
{
DeviceID = x.DeviceId
});

this.mockDeviceTagService.Setup(c => c.GetAllSearchableTagsNames())
_ = this.mockDeviceTagService.Setup(c => c.GetAllSearchableTagsNames())
.Returns(new List<string>());

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Controllers.V10
using System;
using AzureIoTHub.Portal.Server.Controllers.V10;
using AzureIoTHub.Portal.Server.Identity;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.v10;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,8 @@ public void RetrieveRuntimeResponseShouldReturnEdgeAgentSystemModuleRuntimeStatu
}
};

string deviceId = null;

// Act
var result = DeviceHelper.RetrieveRuntimeResponse(twin, deviceId);
var result = DeviceHelper.RetrieveRuntimeResponse(twin);

// Assert
Assert.AreEqual(runtimeStatus, result);
Expand All @@ -257,7 +255,7 @@ public void WhenSystemModulesNotExistRetrieveRuntimeResponseShouldReturnEmptyStr
var twin = new Twin();

// Act
var result = DeviceHelper.RetrieveRuntimeResponse(twin, "aaa");
var result = DeviceHelper.RetrieveRuntimeResponse(twin);

// Assert
Assert.IsEmpty(result);
Expand All @@ -272,7 +270,7 @@ public void WhenEdgeAgentNotExistRetrieveRuntimeResponseShouldReturnEmptyString(
{
};
// Act
var result = DeviceHelper.RetrieveRuntimeResponse(twin, "aaa");
var result = DeviceHelper.RetrieveRuntimeResponse(twin);

// Assert
Assert.IsEmpty(result);
Expand All @@ -291,7 +289,7 @@ public void WhenRuntimeStatusNotExistRetrieveRuntimeResponseShouldReturnEmptyStr
};

// Act
var result = DeviceHelper.RetrieveRuntimeResponse(twin, "aaa");
var result = DeviceHelper.RetrieveRuntimeResponse(twin);

// Assert
Assert.IsEmpty(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Managers
using AzureIoTHub.Portal.Server.Factories;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDevice;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDevice;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
using AzureIoTHub.Portal.Server.Extensions;
using AzureIoTHub.Portal.Server.Helpers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.Concentrator;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.Concentrator;
using Microsoft.Azure.Devices.Shared;
using Microsoft.Extensions.Configuration;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
{
using Azure.Data.Tables;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
using Azure.Data.Tables;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
{
using Azure.Data.Tables;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
using AzureIoTHub.Portal.Server.Helpers;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using Microsoft.Azure.Devices.Shared;
using Moq;
using NUnit.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
using Azure.Data.Tables;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Mappers
using AzureIoTHub.Portal.Server.Helpers;
using AzureIoTHub.Portal.Server.Managers;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDevice;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDevice;
using Microsoft.Azure.Devices.Shared;
using Moq;
using NUnit.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Pages
using System.Threading.Tasks;
using AzureIoTHub.Portal.Client.Pages.Devices;
using AzureIoTHub.Portal.Server.Tests.Unit.Helpers;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using Bunit;
using Bunit.TestDoubles;
using FluentAssertions.Extensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Pages
using AzureIoTHub.Portal.Client.Pages.DeviceModels;
using AzureIoTHub.Portal.Server.Tests.Unit.Helpers;
using AzureIoTHub.Portal.Shared.Models;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using Bunit;
using Bunit.TestDoubles;
using Microsoft.AspNetCore.Components;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Pages
using AzureIoTHub.Portal.Client.Pages.DeviceModels;
using AzureIoTHub.Portal.Server.Tests.Unit.Helpers;
using AzureIoTHub.Portal.Shared.Models;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel;
using Bunit;
using Bunit.TestDoubles;
using FluentAssertions.Extensions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Pages
using System.Net.Http;
using AzureIoTHub.Portal.Client.Pages.DeviceModels;
using AzureIoTHub.Portal.Server.Tests.Unit.Helpers;
using AzureIoTHub.Portal.Shared.Models.V10;
using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel;
using AzureIoTHub.Portal.Shared.Models.v10;
using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel;
using Bunit;
using Bunit.TestDoubles;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace AzureIoTHub.Portal.Server.Tests.Unit.Services
using AzureIoTHub.Portal.Server.Factories;
using AzureIoTHub.Portal.Server.Mappers;
using AzureIoTHub.Portal.Server.Services;
using AzureIoTHub.Portal.Shared.Models.V10.Device;
using AzureIoTHub.Portal.Shared.Models.v10.Device;
using Moq;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@page "/edge/configurations/{ConfigurationID}"
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.v10
@using System.Text.RegularExpressions;
@using System.Collections.Generic;
@attribute [Authorize]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@page "/edge/configurations"
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.v10
@attribute [Authorize]
@inject HttpClient Http
@inject IDialogService DialogService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.v10
@inject HttpClient Http
@inject IJSRuntime JS
@inject ISnackbar Snackbar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
@using AzureIoTHub.Portal.Client.Pages.DeviceModels.LoRaWAN
@using AzureIoTHub.Portal.Client.Validators
@using AzureIoTHub.Portal.Shared.Models
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel
@using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel
@using AzureIoTHub.Portal.Shared.Models.v10
@using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel
@using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel
@using Blazored.Modal
@using Blazored.Modal.Services
@using Microsoft.AspNetCore.Authorization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@using AzureIoTHub.Portal.Shared.Models.V10.Device
@using AzureIoTHub.Portal.Shared.Models.v10.Device
@inject HttpClient Http
@inject IJSRuntime JS
@inject ISnackbar Snackbar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
@using AzureIoTHub.Portal.Client.Pages.DeviceModels.LoRaWAN
@using AzureIoTHub.Portal.Client.Validators
@using AzureIoTHub.Portal.Shared.Models
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel
@using AzureIoTHub.Portal.Shared.Models.V10.LoRaWAN.LoRaDeviceModel
@using AzureIoTHub.Portal.Shared.Models.v10
@using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel
@using AzureIoTHub.Portal.Shared.Models.v10.LoRaWAN.LoRaDeviceModel
@using Blazored.Modal
@using Blazored.Modal.Services
@using Microsoft.AspNetCore.Authorization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@page "/device-models"
@using AzureIoTHub.Portal.Shared.Models.V10
@using AzureIoTHub.Portal.Shared.Models.V10.DeviceModel
@using AzureIoTHub.Portal.Shared.Models.v10
@using AzureIoTHub.Portal.Shared.Models.v10.DeviceModel
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using AzureIoTHub.Portal.Shared.Models.V10
@using System.Net.Http.Json
@using Blazored.Modal
@using Blazored.Modal.Services
Expand Down
Loading

0 comments on commit f1a5329

Please sign in to comment.