From babb476108eae4a7320b869594bb65ca10c54eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sousa?= Date: Fri, 28 Jul 2023 22:27:22 +0100 Subject: [PATCH] fix: codacy warnings --- .../Admin.WebApi/Controllers/ConsumersControllerTests.cs | 2 +- .../Admin.WebApi/Controllers/GroupsControllerTests.cs | 2 +- .../Admin.WebApi/Controllers/TelemetryControllerTests.cs | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/ConsumersControllerTests.cs b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/ConsumersControllerTests.cs index b6aa4d9e1..25d018991 100644 --- a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/ConsumersControllerTests.cs +++ b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/ConsumersControllerTests.cs @@ -17,7 +17,7 @@ [TestClass] public class ConsumersControllerTests { - private Fixture fixture = new(); + private readonly Fixture fixture = new(); private ConsumersController target; private Mock mockConsumerAccessor; private Mock mockConsumerAdmin; diff --git a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/GroupsControllerTests.cs b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/GroupsControllerTests.cs index 86fbbb765..91bbcdf18 100644 --- a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/GroupsControllerTests.cs +++ b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/GroupsControllerTests.cs @@ -16,7 +16,7 @@ [TestClass] public class GroupsControllerTests { - private Fixture fixture = new(); + private readonly Fixture fixture = new(); private GroupsController target; private Mock mockConsumerAccessor; private Mock mockConsumerAdmin; diff --git a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/TelemetryControllerTests.cs b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/TelemetryControllerTests.cs index 087e43e74..0a9d2bd0c 100644 --- a/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/TelemetryControllerTests.cs +++ b/src/KafkaFlow.UnitTests/Admin.WebApi/Controllers/TelemetryControllerTests.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.Linq; - using AutoFixture; using FluentAssertions; using KafkaFlow.Admin; using KafkaFlow.Admin.Messages; @@ -18,7 +17,6 @@ public class TelemetryControllerTests { private Mock mockTelemetryStorage; - private Fixture fixture = new(); private TelemetryController target; [TestInitialize] @@ -34,7 +32,7 @@ public void GetTelemetry_ReturnsOkResultWithTelemetryResponse() // Arrange var metrics = new List { - new ConsumerTelemetryMetric() + new ConsumerTelemetryMetric { GroupId = "group1", ConsumerName = "consumer1",