Refactor NucuCar.UnitTests
This commit is contained in:
parent
3805bd0f15
commit
25d85dc526
5 changed files with 10 additions and 8 deletions
|
@ -3,7 +3,7 @@ using NucuCar.Telemetry;
|
||||||
using NucuCar.Telemetry.Publishers;
|
using NucuCar.Telemetry.Publishers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace NucuCar.UnitTests.NucuCar.Telemetry.Tests
|
namespace NucuCar.UnitTests.NucuCar.Domain.Telemetry.Tests
|
||||||
{
|
{
|
||||||
public class TelemetryPublisherFactoryTest
|
public class TelemetryPublisherFactoryTest
|
||||||
{
|
{
|
|
@ -7,12 +7,11 @@ using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using NucuCar.Domain.Http;
|
using NucuCar.Domain.Http;
|
||||||
using NucuCar.Telemetry;
|
using NucuCar.Telemetry;
|
||||||
using NucuCar.Telemetry.Abstractions;
|
|
||||||
using NucuCar.Telemetry.Publishers;
|
using NucuCar.Telemetry.Publishers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using HttpClient = NucuCar.Domain.Http.HttpClient;
|
using HttpClient = NucuCar.Domain.Http.HttpClient;
|
||||||
|
|
||||||
namespace NucuCar.UnitTests.NucuCar.Telemetry.Tests
|
namespace NucuCar.UnitTests.NucuCar.Domain.Telemetry.Tests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class used to test the TelemetryPublisherFirestore by mocking the GetTelemetry method and HttpClient field.
|
/// Class used to test the TelemetryPublisherFirestore by mocking the GetTelemetry method and HttpClient field.
|
|
@ -1,13 +1,12 @@
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NucuCar.Sensors;
|
|
||||||
using NucuCar.Sensors.Abstractions;
|
using NucuCar.Sensors.Abstractions;
|
||||||
using NucuCar.Sensors.Modules.Environment;
|
using NucuCar.Sensors.Modules.Environment;
|
||||||
using NucuCarSensorsProto;
|
using NucuCarSensorsProto;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests
|
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor
|
||||||
{
|
{
|
||||||
public class Bme680GrpcServiceTest
|
public class Bme680GrpcServiceTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ using System.Threading.Tasks;
|
||||||
using NucuCar.Sensors.Modules.Environment;
|
using NucuCar.Sensors.Modules.Environment;
|
||||||
using NucuCarSensorsProto;
|
using NucuCarSensorsProto;
|
||||||
|
|
||||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests
|
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor
|
||||||
{
|
{
|
||||||
public class TestBme680Sensor : Bme680Sensor
|
public class TestBme680Sensor : Bme680Sensor
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,12 +5,16 @@ using Microsoft.Extensions.Options;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NucuCar.Sensors.Abstractions;
|
using NucuCar.Sensors.Abstractions;
|
||||||
using NucuCar.Sensors.Modules.Environment;
|
using NucuCar.Sensors.Modules.Environment;
|
||||||
using NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests;
|
using NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor;
|
||||||
using NucuCarSensorsProto;
|
using NucuCarSensorsProto;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor
|
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Tests the functionality of the SensorWorker; Since the class is quite generic the test uses the
|
||||||
|
/// Bme680Worker as an example.
|
||||||
|
/// </summary>
|
||||||
public class Bme680WorkerTest
|
public class Bme680WorkerTest
|
||||||
{
|
{
|
||||||
private readonly Mock<ILogger<Bme680Worker>> _mockLogger;
|
private readonly Mock<ILogger<Bme680Worker>> _mockLogger;
|
Loading…
Reference in a new issue