Files
ECMJobRunner/ECMJobRunner.Tests/DTOs/CfgProfileDto.cs
TekH ee3af3e462 Add test infrastructure and repository tests
Introduced `CfgProfileDto` for testing and added a `FakeDataGenerator` utility for generating test data. Updated `ECMJobRunner.Tests.csproj` to support both `.NET Framework 4.8` and `.NET 8.0`, enabling nullable reference types and adding dependencies for testing frameworks, DI, and AutoMapper.

Added `TestFixture` to set up dependency injection and in-memory databases for tests. Created `TestMappingProfile` for AutoMapper configurations. Implemented `CfgProfileRepositoryTests` to validate repository methods, including `GetByIdAsync`, `GetAllAsync`, `AddAsync`, and `FindAsync`.

Enhanced test maintainability with `FluentAssertions` and realistic data generation using `Bogus`.
2026-07-09 16:09:19 +02:00

21 lines
640 B
C#

using System;
namespace ECMJobRunner.Tests.DTOs
{
/// <summary>
/// DTO for CfgProfile entity used in tests
/// </summary>
public class CfgProfileDto
{
public bool Active { get; set; }
public string ProfileName { get; set; } = string.Empty;
public byte TypeId { get; set; }
public string? Schedule { get; set; }
public string? Comment { get; set; }
public string AddedWho { get; set; } = string.Empty;
public DateTime AddedWhen { get; set; }
public string ChangedWho { get; set; } = string.Empty;
public DateTime ChangedWhen { get; set; }
}
}